Page 1 of 1

Weird Operator

Posted: Mon Dec 03, 2007 12:14 am
by SidewinderX
I feel dumb asking this, but since Google omits the characters from the search query, I have no choice...

What does "<>" do?

As in:

Code: Select all

if($S{$n} <> $S{strlen($S)-1}){
//blah blah blah
greater than and less than?

Posted: Mon Dec 03, 2007 12:48 am
by webspider
Not equal.....

Posted: Mon Dec 03, 2007 3:16 am
by s.dot
Yeah

Code: Select all

//same thing here
if ($x <> $y) { }
if ($x != $y) { }
I see it a lot more in SQL than I do in PHP code, really.

Posted: Mon Dec 03, 2007 2:43 pm
by califdon
You gotta be careful, some languages recognize one, some the other, some both. Always consult the language reference. RTFM, in other words.