March 2002
Intermediate to advanced
528 pages
21h 29m
English
usort
void usort(arrayarray, stringfunction)
Sorts an array using a user-defined function. The supplied function is called with two parameters. It should return an integer less than 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.