Help with substracting time from variable

I want to echo the date of today minus 1 day, how do I do this?

I am thinking its something like - needs to be in human readable format.

$yesterday = time() - 1;

echo $yesterday;

but that doesnt work :frowning:

time() is in seconds, not in days :slight_smile:

So, $yesterday = time() - 24 * 3600, or in PHP >= 5.3 $yesterday = new \\DateTime('-1 day');

:slight_smile: