O'Reilly logo

PHP 5 Recipes: A Problem-Solution Approach by Jon Stephens, Frank M. Kromann, Nathan A. Good, Lee Babin

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 4Working with Arrays

If you have worked with PHP 4 or another scripting language, then you have almost certainly worked with arrays—the idea of lists or collections of values is central to programming in general, and PHP is no exception. If you are not already familiar with arrays, you should flip back to Lee Babin's Chapter 1 and get up to speed on just what an array is. Here we will just remind you that the simple definition of the word array is "a collection or list of values."

However, when using arrays in PHP, it is important to remember that PHP lumps together two different sorts of constructs under the same name: ordered lists and unordered lists. Ordered lists are often referred to in PHP as indexed arrays, in which each value ...

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