Number Comparison..Languange Problem???
| From: | Reuben D Budiardja | Date: | Thu, 28 Dec 2000 17:36:07 +0000 |
| Subject: | Number Comparison..Languange Problem??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32107@lists.php.net to get a copy of this message | ||
Suppose I have something like:
$var1 = 0111;
$var2 = 111;
and I do:
if($var1 == $var2)
echo "TRUE";
else
echo "FALSE";
that will return false. Isn't that supposse to be true, since 0111 is essentially 111, and they both are the same type (ie. number)? the variables are not define as string, so why do they give me FALSE in the comparison?
Thanks for any help
Reuben D. Budiardja