Mutley Posted April 15, 2007 Share Posted April 15, 2007 Is negative numbers reversed when using greater than (>) or smaller than (<)? So '-7' is greater than '-3'? Link to comment https://forums.phpfreaks.com/topic/47078-negative-numbers-greatersmaller-problem/ Share on other sites More sharing options...
Barand Posted April 15, 2007 Share Posted April 15, 2007 <?php $a = -7; $b = -3; if ($a < $b) echo "$a is less than $b"; else echo "$a is greater than $b"; ?> Link to comment https://forums.phpfreaks.com/topic/47078-negative-numbers-greatersmaller-problem/#findComment-229616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.