Yeah, you are right, laserlight. I wasn't really thinking clearly, and a sort's loop (even a quicksort) would take longer, even when done within the PHP "kernel."
I do know how search algorithms work. My hope is that PHP uses something better than a bubble sort in it's sort() function (which, incidentally, IS a built-in function of PHP -- hence my confusion at your comment). I'm sure they use quicksort, as it seems to be the favorite sort (there are faster sort algorithms, of course).
I also made the assumption that in this particular case, the array was sequential, not associative. I probably shouldn't have made such an assumption, or at least clarified that my solution would only work in that case. I was going for a solution that was short, not necessarily the fastest. I had forgotten that max() can be used on an array.
Weedpacket's solution is definitely the way to go, and is also probably the fastest -- depending on the algorithm max() uses. It's probably a simple loop through the array values similar to Arc's solution. A timing test would verify which was the best, but it may be overkill in this case. My guess is that Ricky simply needs a method for finding the maximum value, and is not really concerned about speed (especially for a 10 item array).
If anything, this is a clear illustration that in any language, there are many different ways to accomplish the same goal. Some are faster, some require less coding, but in the end if it gives you the solution you want, and is fast enough, then it's the "right" answer.
Ricky, I hope we answered your question sufficiently, and didn't overkill it 😃