PHP ma całą masę funkcji sortujących.
Ten brzmi jak chcesz to asort()
Zobacz podręcznik PHP dla innych alternatyw, takich jak sort() , ksort() , natsort() , usort() i szereg innych odmian. Jest też shuffle() sortować losowo.
[EDIT]OK, krok po kroku, aby uzyskać najwyższą wartość z tablicy:
asort($row); //or arsort() for reverse order, if you prefer.
end($row); //positions the array pointer to the last element.
print current($row); //prints "45" because it's the sorted highest value.
print key($row); //prints "c" because it's the key of the hightst sorted value.
Istnieje wiele innych sposobów, aby to zrobić.