ArraySplice()
Modifies an array by removing elements and adding new elements. It starts from the index, removes as many elements as specified by elementCountForRemoval, and puts the replacements starting from index position. Return the removed elements.
Introduced: 6.0.0.19
ArraySplice( array=array, index=numeric, length=numeric, replacements=array );
Returns: Array
Examples
Days = ['Sun', 'Mon', 'Wed','Thurs', 'Fri','Sat'];
item = ['Tues'];
ArraySplice(Days, 3, 0, item);
writedump(Days);
See also
- Arrays
- array.splice()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)