When dealing with dates it is necessary to add or subtract a given number of days to a date! I use the following little function to do it in PHP.
function dateadd($day,$toadd) //input format: d/m/yyyy
$tmp = explode(“/”,$day);
$dadate = mktime(0,0,0,$tmp,$tmp+($toadd),$tmp);
It is a simple function that split the inputed date into an array and create a date object with the number of additional days included in the creation. And then format the out put!
How to use:
echo dateadd($mydate,30); //output 23/01/2009