Chapter 10. Working with Strings, Dates, and Time

In this chapter, you learn the following:

How to format strings

How to determine the length of a string

How to find a substring within a string

How to break a string down into component parts

How to remove whitespace from the beginning or end of a string

How to replace substrings

How to change the case of a string

How to acquire the current date and time

How to get information about a date and time

How to format date and time information

How to test dates for validity

How to set dates and times

No matter how rich your web content might be, at the heart of it is just HTML that tells the browser how to render string-based content. It is no accident, then, that PHP provides ...

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