arraySort()
arraySort(array $array, string $key = null, integer $dir, boolean $assoc = true)
Sorts an array on a specified key. If the key does not exist, defaults to the first key of the array.
Parameters
array | $array | |
string | $key | The key by which to sort. If not specified then the first key is used. |
integer | $dir | Sort direction: 0 = ascending (default) 1 = descending |
boolean | $assoc | Keep key value association? |