php yesterday date

35

date('F j, Y',strtotime("-1 days"));
$yesterday = new DateTime('yesterday');
echo $yesterday->format('Y-m-d');
echo date("Y-m-d", strtotime("yesterday")); 
date("F j, Y", time() - 86400);

Comments

Submit
0 Comments