Chapter 8. Working with Strings, Dates, and Times
The World Wide Web is very much a plain text environment. No matter how rich Web content becomes, HTML lies behind it all. It is no accident, then, that PHP provides many functions with which you can format, investigate, and manipulate strings. Similarly, dates and times are so much a part of everyday life that it becomes easy to work with them without thinking. However, the quirks of the Gregorian calendar can be difficult to work with in programs. Fortunately, PHP provides powerful tools for date arithmetic that make date manipulation an easy task.
In this chapter, you will learn
How to format strings
How to determine the length of a string
How to find a substring within a string
How to break ...
Get Sams Teach Yourself PHP, MySQL® and Apache All in One 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.