Ross Honniball wrote:
$x = 0; // Numeric zero $y = 'Some kind of string'; if ($x == $y) echo 'they equal using =='; if ($x === $y) echo 'they equal using ==='; The above will echo 'they equal using =='. The values don't look very equal to me. Can anyone explain the logic behind this? I'm heading home now but look forward to your explanations tomorrow. PS Incidently, to 'fix' it so it behaves as it should, you can code: if ($x.'' == $y.'') echo 'this will not print and all is good.'; Regards .. Ross
there is some stuff about it here: http://us2.php.net/manual/en/language.types.boolean.php
sorry if this posted twice :p -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php