sort() - sort arrays in ascending order
rsort() - sort arrays in descending order
asort() - sort associative arrays in ascending order, according to the value
ksort() - sort associative arrays in ascending order, according to the key
arsort() - sort associative arrays in descending order, according to the value
krsort() - sort associative arrays in descending order, according to the key
PHP function sort(array &$array, int $flags) bool
---------------------------------------------
Sort an array
Parameters:
array--$array--The input array.
int--$flags--[optional] The optional second parameter sort_flags may be used to modify the sorting behavior using these values.
Sorting type flags: SORT_REGULAR - compare items normally (don't change types).
Returns: true on success or false on failure.