ArrayClear()
Removes all elements from an array.
ArrayClear( array=array );
Returns: Boolean
Examples
// Creates an array containing 4 elements with the numbers 1 - 4.
numbers = [ 1, 2, 3, 4 ];
dump( numbers ); // outputs the array containing 1 - 4
// Clears the array leaving an array with 0 elements.
ArrayClear( numbers );
dump( numbers ); // outputs the empty array
See also
- Arrays
- array.clear()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)