Onetastic Macro Documentation >
>
>
Array_FlipKeysAndValues Array_FlipKeysAndValues
Exchanges the keys and their associated values in the given array. The values must be numeric or string since they will now become keys.
Syntax
void Array_FlipKeysAndValues(byref Array array)
Parameters
- Array array
- Array to flip keys and values.
Examples
$array = Array("red", "green", "blue", 5)
Array_FlipKeysAndValues($array)
$array = Array(GetCurrentPage(), GetCurrentSection())
Array_FlipKeysAndValues($array)
$array = Array(3, 5, 8, 5, 2, 3)
Array_FlipKeysAndValues($array)
|