|
ArrayObject::asortSort the entries by value Description
public true ArrayObject::asort(int
$flags = SORT_REGULAR )Sorts the entries in ascending order, such that its keys maintain their correlation with the values they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant.
Parameters
Return Values
Always returns Changelog
Examples
Example #1 ArrayObject::asort example
The above example will output: c = apple b = banana d = lemon a = orange The fruits have been sorted in alphabetical order, and the key associated with each entry has been maintained. See Also
|