array_multisort
bool array_multisort(array array_1, [mixed ...])
array_1 | Array to sort |
... | Further arrays to sort, or sorting flags |
Sorts one or more arrays.
Returns:
TRUE on success; FALSE on failure
Description:
This function sorts one or more arrays at a time, while keeping key/value relationships intact. The sorting is done as though the arrays were columns in a table. The first array is sorted, and identical elements are then sorted by the corresponding elements from the second array. Identical elements of the second array are then sorted by the corresponding elements from the third array, and so on. This example assumes that you have at least three arrays, of course.
After the first argument, array_1 , which must be an array, any ...
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.