Chapter 3. Arrays, Strings, and Advanced Data Manipulation in PHP

In the previous chapter, we introduced the basics of the PHP language. In this chapter we show you some important techniques you'll need to manipulate data in PHP. This includes ways of dealing with arrays, strings, dates, and numerical data. The topics in this chapter cover:

  • Arrays and array library functions

  • Strings and string library functions

  • Regular expressions

  • Date and time functions

  • Integer and float functions

We don't attempt to cover every function and library supported by PHP. However, we provide brief descriptions of them in Appendix E. In later chapters, we discuss selected specialized library functions that support the topics and techniques presented here.