I was very unhappy to discover a few days ago that "spam" == 0 returns
true.  Unbelievable... you can compare a true value to a false value
and PHP will say they're equal.  (What were they smoking?)


I haven't tried the comparison above, but I have used the following many times ...


if ($a) // THIS IS FALSE. $a has no value yet

$a = "spam";
if ($a) // THIS IS TRUE

if ($a == "legit") // THIS IS FALSE




Reply via email to