Todays date also!
1 2 3 4 5 6 7 8 |
<?php date_default_timezone_set('Europe/London'); echo $today=date("Y-m-d");// todays date echo "<br>"; echo date("Y-m-d", strtotime( '-1 days' ) ); ?> |
Easy to read (2nd July, 2014 – 15:58 pm)
1 2 3 |
echo date("jS F, Y - H:i a"); |
or
1 2 3 |
$yesterday= date("Y-m-d", time()-86400); |