Page 1 of 1

If not construct

Posted: Wed Oct 31, 2007 10:32 pm
by zardiw
I would like to use this, but don't know if it's allowed:

Code: Select all

If !($a == $b) 


or do I have to use:

If ($a !== $b)


z

Posted: Wed Oct 31, 2007 10:33 pm
by Kieran Huggins
fastest way is to try it ;-)

Also, the two examples don't equate (even if they both worked, which they don't)
http://php.net/manual/en/language.opera ... arison.php

Posted: Thu Nov 01, 2007 2:54 am
by rung

Code: Select all

!($a == $b)
is the equivalent of

Code: Select all

($a != $b)