i think strtotime() doesn't understand the $month variable, Since you are adding $month + 1 the function strtotime needs the + and the variable is not passing the + sign .. hope that makes sense .. instead of putting a variable in strtotime try just doing strtotime("+1 month"); and see if it works.
Note: strtotime() does the math, thats why it doesn't work, or at least thats what i think is happening. cheers, - Sebastian -----Original Message----- From: shaun [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 4:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Increase a month Hi, could someone tell me why this: <?php $month = date(m); echo "\$month: ".date(F,strtotime($month))."<br>"; $month = $month + 1; echo "\$month: ".date(F,strtotime($month))."<br>"; ?> outputs this: $month: March $month: March surely it should be: $month: March $month: April Thanks in advance for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php