how to get the previous date in PHP
how to get the previous date in PHP
1 Answer
to get the previous date you can use strtotime() function
example
<?php
echo date('Y-m-d' , strtotime('-1 day'));
?>
the output will be the previous date
answer Link