Given today's date in the form day, month, year, output tomorrow's date in the same format.
<? // today's day, month and year $day = date(d); $month = date(m); $year = date(Y); // work out the timestamp of tomorrows date // if this is the last day of month/year, it will loop round to the next month/year $seconds = mktime(1,1,1,$month,$day+1,$year); // output today and tomorrow echo 'Today is ' . date('F jS, Y') . ', so tomorrow is ' . date('F jS, Y', $seconds);?>Which produces:
Today is July 23rd, 2008, so tomorrow is July 24th, 2008
The strtotime() function is really useful for working out problems like this:
<? // output today and tomorrow echo 'Today is ' . date('F jS, Y') . ', so tomorrow is ' . date('F jS, Y', strtotime('Tomorrow'));?>Which produces:
Today is July 23rd, 2008, so tomorrow is July 24th, 2008