Onetastic Macro Documentation >
>
>
Array_SortByValue Array_SortByValue
Sorts an array by the values.
Syntax
void Array_SortByValue(
byref Array array,
Bool preserveKeys)
Parameters
- Array array
- Array to sort.
- Bool preserveKeys
- If true, the values in the array will have the same keys as before, but just order changed. If false, the values will be assigned to new numeric keys starting from zero.
Examples
$array = Array(6, 3, 7, 8, 4, 2, 3)
Array_SortByValue($array, false)
$array = Array(6, 3, 7, 8, 4, 2, 3)
Array_SortByValue($array, true)
|