Weird Operator

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

Weird Operator

Post 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?
User avatar
webspider
Forum Commoner
Posts: 52
Joined: Sat Oct 27, 2007 3:29 am

Post by webspider »

Not equal.....
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

You gotta be careful, some languages recognize one, some the other, some both. Always consult the language reference. RTFM, in other words.
Post Reply