Function sortArray
General one dimensional array sorting function. Key/value associations are preserved.
If the system's PHP has the native intl extension and its Collator class available and $natsort is set to true the sorting is locale sensitive (true natural order).
The function follows native PHP array sorting functions (natcasesort() etc.) and uses the array by reference and returns true or false on success or failure.
array |
& $array |
The array to sort. The array is passed by reference |
string |
$descending = false |
true for descending sorts (default false) |
boolean |
$natsort = true |
If natural order should be used (default true). If available sorting will be locale sensitive. |
boolean |
$case_sensitive = false |
If the sort should be case sensitive (default false). Note if $natsort is true and locale aware sorting is available sorting is always case sensitive |
boolean
|
boolean |