O'Reilly logo

PHP 5 Unleashed by John Coggeshall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Arrays

The focus of this chapter is one of the most powerful data structures available to PHP developers today—the array. Despite its relative ease of use, an array is considered one of the two complex data types available in PHP (the second is objects discussed in Chapter 13, "Object-Oriented Programming in PHP").

Basic Arrays

In PHP (and unlike most other programming languages that implement them) arrays are a means of grouping any number of different variables, regardless of type, into a single variable. Technically, arrays actually represent an ordered map that maps key values to pieces of variable data (see Figure 2.1). The contents of a value pointed to by a key in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required