I am trying to add a certain amount of days to a set date in PHP. However, all of the code I use is not working. Here is the code I am currently experiencing problems with:<
For the sake of completeness, here's how you do it with DateTime():
$datetime = new DateTime("2013-12-01"); $datetime->add(new DateInterval('P7D')); echo $datetime->format('Y-m-d');
or
$datetime = new DateTime("2013-12-01"); $datetime->modify('+7 days'); echo $datetime->format('Y-m-d');