Even doing a type cast won't make a difference for the original problem. Even if you cast "08" to an integer and compare it to 08 (invalid octal number), it'll still fail.
The original solution was the best, remove the leading zero from the comparisons and let PHP handle the type casting. ---John Holmes... ----- Original Message ----- From: "Ray Hunter" <[EMAIL PROTECTED]> To: "Scott Fletcher" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 3:45 PM Subject: Re: [PHP] Found a PHP bug!!!!!!!!! > U might want to do a type cast to integer from string... > > http://www.php.net/manual/en/language.types.type-juggling.php > > > On Mon, 2003-01-27 at 13:47, Scott Fletcher wrote: > > I would need to use intval() to solve this problem.... > > > > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I'm referring to '08' and '09' that don't work.... > > > > > > "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > --- Scott Fletcher <[EMAIL PROTECTED]> wrote: > > > > > Found a PHP bug > > > > ... > > > > > if ($month == 01) > > > > > > > > I guess you mean: > > > > > > > > if ($month == '01') > > > > > > > > If so, this is not a bug. Otherwise, please explain what > > > > you think is wrong. > > > > > > > > Chris > > > > > > > > > -- > 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