September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool arsort(array array, [int flag])
| array | Array to be sorted |
| flag | Flag specifying how to compare element values (PHP 4.0.0+ only) |
Sorts the given array in descending order by element value.
Returns:
TRUE on success; FALSE on error
Description:
Sorts the elements of the array given by array in descending order by element value while maintaining the key/value associations. This function differs from rsort() in that it works with both associative and indexed arrays.
This function operates directly on the passed array.
After calling arsort(), the internal array pointer is on the first element of array .
(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 ...
Read now
Unlock full access