chmpdog Posted June 18, 2009 Share Posted June 18, 2009 Hello, What does this code do? if($i <> $eu){ //stuff } thanks Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/ Share on other sites More sharing options...
ldougherty Posted June 18, 2009 Share Posted June 18, 2009 That would be an if statement comparing the values of $i and $eu stating if $i and $eu are not the same to do something which would be executed where you see //stuff http://us.php.net/manual/en/control-structures.if.php Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859204 Share on other sites More sharing options...
chmpdog Posted June 18, 2009 Author Share Posted June 18, 2009 so the "<>" means not the same? Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859217 Share on other sites More sharing options...
ldougherty Posted June 18, 2009 Share Posted June 18, 2009 indeed. http://us3.php.net/manual/en/language.operators.comparison.php $a != $b Not equal TRUE if $a is not equal to $b. $a <> $b Not equal TRUE if $a is not equal to $b. Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859220 Share on other sites More sharing options...
Maq Posted June 18, 2009 Share Posted June 18, 2009 so the "" means not the same? The best way to find out is to test it. Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859227 Share on other sites More sharing options...
yanjchan Posted June 19, 2009 Share Posted June 19, 2009 Doesn't <> mean less than or equal? (I'm sorry if this is a really stupid statement) Couldn't it be !=? If this is off topic... You don't need to respond. Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859286 Share on other sites More sharing options...
Philip Posted June 19, 2009 Share Posted June 19, 2009 Doesn't <> mean less than or equal? (I'm sorry if this is a really stupid statement) Couldn't it be !=? If this is off topic... You don't need to respond. Take a look at: http://us3.php.net/manual/en/language.operators.comparison.php $a != $b Not equal TRUE if $a is not equal to $b. $a <> $b Not equal TRUE if $a is not equal to $b. Less than or equal is <= Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859288 Share on other sites More sharing options...
chmpdog Posted June 19, 2009 Author Share Posted June 19, 2009 thanks king Link to comment https://forums.phpfreaks.com/topic/162822-solved-what-does-this-snippet-of-code-do/#findComment-859714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.