Tags · Functions · Objects
Lucee Function Reference
Choose a function:

Function ARRAYSWAP

Swaps array values of an array at specified positions. This
function is more efficient than multiple cfset tags

Example

arrayswap(array array,number position1,number position2):boolean

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Description
array array  Yes Array to Swap  
position1 number  Yes Position of first element to swap  
position2 number  Yes Position of second element to swap