Re: Increase a month
| From: | Christopher J. Crane | Date: | Thu, 20 Mar 2003 14:03:30 +0000 |
| Subject: | Re: Increase a month | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140432@lists.php.net to get a copy of this message | ||
echo "\$month: ".date(F,strtotime($month))."<br>";
you have escaped the $ by placing the \ in front of it. Remove it.
"Shaun" <shaun@mania.plus.com> wrote in message
news:20030320140027.82780.qmail@pb1.pair.com...
> 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.
>
>