Quote:
Originally Posted by Lynne
It's valid. This is from the php manual:
Code:
$a != $b Not equal TRUE if $a is not equal to $b.
$a <> $b Not equal TRUE if $a is not equal to $b.
$a !== $b Not identical TRUE if $a is not equal to $b, or they are not of the same type. (introduced in PHP 4)
|
"!=" and "<>" are aliases. They both mean "not equal". Most people use "!=" when programming in PHP because the operator is somewhat easier to understand. "!" in PHP means "not", so it's logical to use it with the equal operator to form "not equal".
In SQL, most people use "<>", as it is standard SQL. The "!=" operator only exists in certain versions of SQL.