you can use strtotime function , to get all the solution , regarding date and time .
please find the below script to get previous date from current date
<?php echo date('Y-m-d', strtotime('-7 days')); // It shows 7 days previous date echo date('Y-m-d', strtotime('+4 days')); // It shows 4 days Next date ?>