Chapter 5: Better Arrays and String Handling

Chapter 5: Better Arrays and String Handling


So far, you have learned quite a bit about how to work with information in your PHP programs. In this chapter, you will learn some important new skills to improve the ways you work with data. You will learn about some more sophisticated ways to work with arrays, and how to manage text information with more flair. Specifically, you will learn how to:

  • Manage arrays with the foreach loop.

  • Create and use associative arrays.

  • Extract useful information from some of PHP's built-in arrays.

  • Build basic two-dimensional arrays.

  • Build two-dimensional associative arrays.

  • Break a string into smaller segments.

  • Search for one string inside another.