|
arsortSort an array in descending order and maintain index association Description
true arsort(array
&$array, int $flags = SORT_REGULAR)
Sorts This is used mainly when sorting associative arrays where the actual element order is significant.
Parameters
Return Values
Always returns Changelog
Examples
Example #1 arsort example The above example will output: a = orange d = lemon b = banana c = apple The fruits have been sorted in reverse alphabetical order, and the index associated with each element has been maintained. See Also
|