That would work for three numbers, but what if you have 20? I would put the values into an array then do an arsort() on the array. Then the first entry in the array would be the biggest.
You can also checkout the link below for a comparison of array sorting functions.