Exchanges the two elements within the array.
Note: This method will fail if one of the parameters is larger or smaller than the number of elements in the array.
This example exchanges the 2nd and 5th elements of an array.
var( myArray = array('one', 'two', 'three', 'four', 'five', 'six', 'seven') ) //output original array $myArray '\n' $myArray->exchange(2,5) //output modified array $myArray
array(one, two, three, four, five, six, seven) array(one, five, three, four, two, six, seven)
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.