February 2013
Intermediate to advanced
538 pages
20h 55m
English
usort
bool usort(arrayarray, callablefunction)
Sorts an array using a user-defined function. The supplied function is called with two parameters. It should return an integer less than 0 if the first argument is less than the second, 0 if the first and second arguments are equal, and an integer greater than 0 if the first argument is greater than the second. The sort order of two elements that compare equal is undefined. See Chapter 5 for more information on using this function.
Returns true if the function
was successful in sorting the array, or false otherwise.
Read now
Unlock full access