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;
but that doesnt work
time() is in seconds, not in days
$yesterday = time() - 24 * 3600, or in PHP >= 5.3
$yesterday = new \\DateTime('-1 day');
This topic is now closed. New replies are no longer allowed.