O'Reilly logo

Sams Teach Yourself PHP, MySQL by Julie C. Meloni

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 8. Working with Arrays

Arrays are used to store and organize data. PHP includes many functions that enable you to create, modify, and manipulate arrays, which you will use frequently throughout the procedural programming method described in this book.

In this chapter, you learn the basics of working with arrays, including

  • How to create associative and multidimensional arrays

  • How to use the myriad array-related functions built into PHP

What Are Arrays?

You’ve already learned about and used scalar variables in the earlier chapters in this book, and thus you know that these variables are used to store values. But scalar variables can store only one value at a time—the $color variable can hold only a value of red or blue, and so forth, but it cannot ...

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