php echo yesterday date code example
Example 1: php yesterday
$yesterday = new DateTime('yesterday');
echo $yesterday->format('Y-m-d');
Example 2: yesterday php
date("F j, Y", time() - 86400);
$yesterday = new DateTime('yesterday');
echo $yesterday->format('Y-m-d');
date("F j, Y", time() - 86400);