try comparing the type:

if("0" === 0)echo 'Its not equal';
if(0 === 0)echo 'Its equal';

OKi98 wrote:

Why does anything compared to 0 return true?

I know it might seem to be a bit off-topic, but for me it is important for detecting if NULL value in table has been changed (for example NULL is changed to 0).

if ("foo"==0) echo("foo equals to 0");


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to