Adding Days To A Date
Moderator: General Moderators
Adding Days To A Date
OK, I need to take the current date and add 24 days onto it. How would I do that so the months and days all make sense? I mean I could break out the day of the month, but I don’t understand how to make it change to the next month.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
This may be useful to you 
Code: Select all
//whatever your date in timestamp is
$currentTime = time();
$futurDate = strtotime('+24 days', $currentTime);
echo date('M-d-Y', $futurDate);Code: Select all
echo date("m/d/Y",strtotime("+24 days"));