strtotime() function as a do...while condition
| From: | Simon Cox | Date: | Sun, 10 Sep 2000 17:57:51 +0000 |
| Subject: | strtotime() function as a do...while condition | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2562@lists.php.net to get a copy of this message | ||
I am having a problem using the strtotime() function as a do...while
condition (see below). When ever I use the following code with the month of
October (any year), I generate a endless loop; all other months are fine. I
am using PHP 4.0.2 and Apache 1.3.12 under MS Windows 98 SE.
<?
$dtDate = ("10/01/00");
$nMonth = ("10");
do {
// Build a calendar table
$dtDate = (date("m/d/y", (strtotime($dtDate) + 86400)));
} while (date("m", strtotime($dtDate)) == $nMonth);
?>
Any ideas?
Any help gratefully received!
Regards...
Simon