O'Reilly logo

Sams Teach Yourself PHP, MySQL® and Apache All in One, Fifth Edition by Julie 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

In this chapter, you learn the following:

How to create associative and multidimensional arrays

How to use the myriad array-related functions built in to PHP

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

What Are Arrays?

You’ve already learned about and used scalar variables in the earlier chapters in this book, and therefore 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 be used to hold ...

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