Swaps array values of an array at specified positions. This
function is more efficient than multiple cfset tags
Lucee Function Reference
arrayswap()
Example
arrayswap(array array,number position1,number position2):boolean
Category
array
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 |