arn_php Posted March 23, 2009 Share Posted March 23, 2009 if ($total=='0') { I am using the code above into my php.. the problem is if the result gets into -1 or -2 or whatever minus.. then the if ($total=='0') is not working properly.. how do I modify it? Link to comment https://forums.phpfreaks.com/topic/150747-solved-how-about-minus/ Share on other sites More sharing options...
Yesideez Posted March 23, 2009 Share Posted March 23, 2009 if ($total == -1) { Try that but must admit, never tried it myself. Link to comment https://forums.phpfreaks.com/topic/150747-solved-how-about-minus/#findComment-791960 Share on other sites More sharing options...
Daniel0 Posted March 23, 2009 Share Posted March 23, 2009 if ($total <= 0) { If $total is less than or equal 0. http://dk.php.net/manual/en/language.operators.comparison.php Link to comment https://forums.phpfreaks.com/topic/150747-solved-how-about-minus/#findComment-791962 Share on other sites More sharing options...
Yesideez Posted March 23, 2009 Share Posted March 23, 2009 Maybe I should start reading questions clearer. Daniel - love the M$ joke in your sig! Link to comment https://forums.phpfreaks.com/topic/150747-solved-how-about-minus/#findComment-791966 Share on other sites More sharing options...
arn_php Posted March 24, 2009 Author Share Posted March 24, 2009 Thanks guys!! Awesome! Link to comment https://forums.phpfreaks.com/topic/150747-solved-how-about-minus/#findComment-792319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.