uksort

uksort

(PHP 4, PHP 5, PHP 7)

uksortSort an array by keys using a user-defined comparison function

Description

bool uksort ( array &$array , callable $key_compare_func )

uksort() will sort the keys of an array using a user-supplied comparison function. If the array you wish to sort needs to be sorted by some non-trivial criteria, you should use this function.

Note:

If two members compare as equal, their relative order in the sorted array is undefined.