Re: [PHP] Increase a month

2003-03-21 Thread Sebastian
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

Re: [PHP] Increase a month

2003-03-21 Thread Kevin Stone
echo date("F"); // prints March echo date("F", strtotime("month + 1")); // prints April - Kevin - Original Message - From: "Boaz Yahav" <[EMAIL PROTECTED]> To: "shaun" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent

RE: [PHP] Increase a month

2003-03-21 Thread Boaz Yahav
: [EMAIL PROTECTED] Subject: [PHP] Increase a month Hi, could someone tell me why this: "; $month = $month + 1; echo "\$month: ".date(F,strtotime($month)).""; ?> outputs this: $month: March $month: March surely it should be: $month: March $month: April Tha

Re: [PHP] Increase a month

2003-03-20 Thread Justin French
For this exact instance (ie, trying to get the current month, and next month) then all you need is: Justin on 21/03/03 1:00 AM, shaun ([EMAIL PROTECTED]) wrote: > Hi, > > could someone tell me why this: > > $month = date(m); > echo "\$month: ".date(F,strtotime($month)).""; > $month = $mon

Re: [PHP] Increase a month

2003-03-20 Thread Joshua Moore-Oliva
date() returns a unix timestamp, which is in seconds. You are only adding one second. Try using mktime, and increment hte month argument there. Josh. On March 20, 2003 09:00 am, shaun wrote: > Hi, > > could someone tell me why this: > > $month = date(m); >echo "\$month: ".date(F,strtot

[PHP] Increase a month

2003-03-20 Thread shaun
Hi, could someone tell me why this: "; $month = $month + 1; echo "\$month: ".date(F,strtotime($month)).""; ?> 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/