Chapter 6. Arrays

This chapter examines how you define, declare, assign, compare, and process arrays. It introduces the general concept of arrays before discussing the specifics of how PHP arrays work. The chapter covers the following array topics:

  • Defining arrays

  • Managing arrays

  • Sorting arrays

  • Merging and partitioning arrays

Arrays are programming structures that hold lists of like things. These lists are often indexed by a series of sequential numbers that start with zero or one and increase one value at a time. Using sequential numeric index values ensures that the index value can be used to traverse a complete list by incrementing or decrementing the index by 1 each iteration of a loop. Also, the lack of gaps in the array index leads to labeling ...

Get Oracle Database 10g Express Edition PHP Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.