Chapter 8. Working with Arrays and Objects

Arrays and objects are used to store and organize data. PHP includes a large number of functions that enable you to create, modify, and manipulate arrays, which you will use frequently throughout the procedural programming method described in this book. However, the object-oriented programming structures found in many programming languages are also evident in PHP, and you will catch a glimpse of them in this chapter.

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

  • How to create and manipulate arrays using the myriad array-related functions built into PHP

  • How to create and manipulate objects and the data they contain

What is an Array?

You’ve already learned about and used ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One, Second Edition 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.