How do I add a certain number of days to the current date in PHP?
I already got the current date with:
$today = date(\'y:m:d\');
Ju
With php 5.3
$date = new DateTime(); $interval = new DateInterval('P1D'); echo $date->format('Y-m-d') , PHP_EOL; $date->add($interval); echo $date->format('Y-m-d'), PHP_EOL; $date->add($interval); echo $date->format('Y-m-d'), PHP_EOL;
will output
2012-12-24
2012-12-25
2012-12-26