September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool rsort(array array, [int flag])
| array | Array to sort |
| flag | Flag specifying how to compare key values (PHP 4.0.0+ only) |
Sorts an array in descending order by element value.
Returns:
TRUE on success; FALSE on failure
Description:
Sorts array in descending order by element value. String indexes are ignored and the resulting array is indexed numerically. Use arsort() if you’re working with an associative array. The key values for the resulting indexed array are reordered after the sort is completed.
array is modified directly by this function.
(PHP 4.0.0+ only) The way in which element values are compared can be modified by passing one of the following named constants as flag :
| SORT_REGULAR | Compare element values according to PHP’s ... |
Read now
Unlock full access