Posted by "Christopher J. Bottaro" on 08/11/05 20:10
Scott Noyes wrote:
>> [snip]
>> Is it a bug that ($var == 0) is always true for any string $var?
>> [/snip]
>>
>> You are comparing a string to an integer.
>
> Right. This is clearly documented at
> http://www.php.net/operators.comparison
>
Oh, I see...it converts the string into number, not the other way around.
Thanks for the link.
Navigation:
[Reply to this message]
|