Use the
<?php
echo date('Y-m-d', strtotime('-5 days')); // It shows 5 days previous date
echo date('Y-m-d', strtotime('+5 days')); // It shows 5 days Next date
?>
strtotime method provided by PHP.<?php
echo date('Y-m-d', strtotime('-5 days')); // It shows 5 days previous date
echo date('Y-m-d', strtotime('+5 days')); // It shows 5 days Next date
?>
No comments:
Post a Comment