Comparing many numbers in PHP?

pandemonium7386

New member
I have a data table with 6 numbers (2 x 3 table) and I want to use PHP to find the max number (this is in decimals up to 2 places eg. 41.56).

I was thinking about comparing the first two numbers, then getting the largest number from those two and use that to compare it with the 3rd number, then repeat until all 6 numbers are compared. The PHP then spits out the value.

Is this the easiest way to do this? If so, how do I code this? Much thanks for any relevant reply!
 
Back
Top