kartul Posted June 27, 2009 Share Posted June 27, 2009 I need to check two numbers and return smaller one. how do to that? google tried to help me but he didn't succeed... Quote Link to comment https://forums.phpfreaks.com/topic/163873-solved-check-two-numbers-and-return-smaller-number/ Share on other sites More sharing options...
trq Posted June 27, 2009 Share Posted June 27, 2009 function check($n1, $n2) { if ($n1 < $n2} { return $n2; } else { return $n1; } } Quote Link to comment https://forums.phpfreaks.com/topic/163873-solved-check-two-numbers-and-return-smaller-number/#findComment-864633 Share on other sites More sharing options...
kartul Posted June 27, 2009 Author Share Posted June 27, 2009 ok.. I can swear I tried that... anyway, it works (now). thank you Quote Link to comment https://forums.phpfreaks.com/topic/163873-solved-check-two-numbers-and-return-smaller-number/#findComment-864635 Share on other sites More sharing options...
.josh Posted June 27, 2009 Share Posted June 27, 2009 min Quote Link to comment https://forums.phpfreaks.com/topic/163873-solved-check-two-numbers-and-return-smaller-number/#findComment-864640 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.