usort

Example

 bool usort ( array &$array , callback $cmp_function ) 

Description

This function will sort an array by its values 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 order in the sorted array is undefined. Note: This function assigns new keys to the elements in array. It will remove any existing keys that may have been assigned, rather than just reordering the keys.

Return Values

Returns TRUE on success or FALSE on failure.