RE: [PHP] Increase a month

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

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: Friday, March 21, 2003 1:44 PM Subject: RE: [PHP] Increase a month This can help

Re: [PHP] Increase a month

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

[PHP] Increase a month

2003-03-20 Thread shaun
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

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: ?php $month = date(m); echo \$month:

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: ? $thisMonth = date(F,strtotime('today')); $nextMonth = date(F,strtotime('next month')); ? Justin on 21/03/03 1:00 AM, shaun ([EMAIL PROTECTED]) wrote: Hi, could someone tell me why this: