advancedfuture Posted June 16, 2008 Share Posted June 16, 2008 So lets say I have a group of varialbes all with different numerical values, and I want to print to find and print the varialbe with the lowest value and the highest value.. How would I write that in PHP... the varialbes are dynamic and can change. $val1 = 100; $val2 = 300; $val3 = 600; $val4 = 1; $val5 = 20; Link to comment https://forums.phpfreaks.com/topic/110370-getting-lowest-and-highest-value-out-of-group-of-variables/ Share on other sites More sharing options...
tapos Posted June 16, 2008 Share Posted June 16, 2008 use max() and min(). for further info http://www.php.net/manual/en/function.max.php http://www.php.net/manual/en/function.min.php Link to comment https://forums.phpfreaks.com/topic/110370-getting-lowest-and-highest-value-out-of-group-of-variables/#findComment-566267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.