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... 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; } } 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 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 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
Archived
This topic is now archived and is closed to further replies.