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; Quote Link to comment 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 Quote Link to comment 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.