Re: Increase a month

From: Date: Fri, 21 Mar 2003 21:09:03 +0000
Subject: Re: Increase a month
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140635@lists.php.net to get a copy of this message
echo date("F"); // prints March echo date("F", strtotime("month + 1")); // prints April - Kevin ----- Original Message ----- From: "Boaz Yahav" <berber@netvision.net.il> To: "shaun" <shaun@mania.plus.com>; <php-general@lists.php.net> Sent: Friday, March 21, 2003 1:44 PM Subject: RE: [PHP] Increase a month > This can help : > > > http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3541 > > Sincerely > > berber > > Visit http://www.weberdev.com/ Today!!! > To see where PHP might take you tomorrow. > > > -----Original Message----- > From: shaun [mailto:shaun@mania.plus.com] > Sent: Thursday, March 20, 2003 4:00 PM > To: php-general@lists.php.net > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#140635) next »