Number Comparison..Languange Problem???

From: Date: Thu, 28 Dec 2000 17:16:16 +0000
Subject: Number Comparison..Languange Problem???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32123@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

« previous php.general (#32123) next »