Page 1 of 1

How to do max ( $myarray [*][2] );

Posted: Wed Nov 27, 2002 8:55 am
by liderbug
Without doing a loop how do you get the max value of column 2 of a multidim array?

Tks
Chuck

Posted: Wed Nov 27, 2002 9:02 am
by mydimension
this topic has more relevance in the PHP forum. so i have moved it there.

Posted: Wed Nov 27, 2002 9:11 am
by twigletmac
You could do a sort in reverse order (http://www.php.net/manual/en/function.rsort.php) and then grab the top element.

Mac