RE: [PHP] What's wrong with this code??

From: Date: Fri, 30 May 2003 23:17:19 +0000
Subject: RE: [PHP] What's wrong with this code??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149614@lists.php.net to get a copy of this message
> ******** Problem lines******** > > if ($mo == 06 and $dy > 01 and $dy < 09) { $wd = "8"; } > if ($mo == 06 and $dy > 08) { $wd = "9"; } > but if I change my date to 06/02 then no matter what I > try, $wd always gets the value of 9 (it should be 8 on this > date). It should > not get the value 9 until the 9th of June. If the first if is true, so is the second, unless $dy == 8. In this case, the number is 2, which is greater than 1 and less than both 8 and 9, making both statements true. Check your logic.

« previous php.general (#149614) next »