ArrayClear()

Removes all elements from an array.

ArrayClear( array=array );

Returns: Boolean

Argument Description
array
array, required

Name of an array

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