Link to home
Start Free TrialLog in
Avatar of chrisfixit
chrisfixit

asked on

How can #i get the previous day's date in PHP?

<? echo $d=date('dm') ; ?> gives me today's date in the format I want.. how do I get the previous day?
ASKER CERTIFIED SOLUTION
Avatar of megadeth199
megadeth199
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

$yesterday = date('d/m/y', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));

Open in new window