Adding days to a PHP date.
I am converting a mySQL date to PHP and then attempting to add days to it for the output. Here is what I have so far:
$tempDate = strtotime($row['duedate']);
$newDate = date("Y-m-d",$tempDate);
$fiveDaysLater = strtotime(date("Y-m-d", strtotime($newDate) . " +1 day"));
Output:
1303192800
The date I am taking from MySQL is 2011-04-19.
I really just need to output the new PHP date as something like 04/20/2011 or something similar. Any help is appreciated!
Thanks.
P.S. - If anyone knows, can you please let me know if adding enough days will take you to the next month, or will it wrap around back to the first of the month?
