Now that you know how to get the current timestamp, let's explore how to determine some other timestamps close to the current time. For example, you can extract yesterday's timestamp or, say, next Friday's. There are two general methods for finding these values:
Determining the timestamp based on a string
Determining the timestamp from date values (which can be a bit trickier)
strtotime() function can sometimes be a PHP programmer's best friend. Just as its name suggests,
strtotime() generates a timestamp from an English date-phrase, such as April 1 or Friday. These strings can be either relative to the current date or absolute. Table 6-2 outlines some ...