I figured it was along those lines... i know that perl also caught
me a few times becuase perl differentiates between "==" and "eq"
for numerical or string comparisions.

I'll probaly end up using the "===", becuase i've got a severe
aversion to using functions for comparisions.  :-)

--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Marco Tabini" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think this is happening because you're comparing apples to oranges.
> Your first comparison causes an integer to be compared to a string.
> Because the string "string" evaluates to the integer value 0, the
> comparison succeeds. The manual recommends the use of the identical
> comparison operator (===) instead, or--better yet--the strcmp() function
> when comparing two strings.
>
> Cheers,
>
>
> Marco
>
> --
> ------------
> php|architect - The magazine for PHP Professionals
> The monthly worldwide magazine dedicated to PHP programmers
>
> Come visit us at http://www.phparch.com!
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to