Re: Next month
| From: | Jason Brooke | Date: | Wed, 07 Mar 2001 05:34:17 +0000 |
| Subject: | Re: Next month | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42856@lists.php.net to get a copy of this message | ||
Hi Tyler - did you check the date functions in the manual?
date() with the 'n' format let's you grab the month's ordinal from a unix
timestamp, and mktime() let's you easily create unix timestamps
$next_mon = date("n", mktime(0,0,0,date("m")+1));
jason
> Hello,
>
> How do I get the number of the next month (Ex: 4). And when the current
> month reaches 12, the next month would be 1 and the next year would be
2002.
> Anybody know how I can accomplish this?
>
> Thanks,
> Tyler Longren