ArrayMid()

Extracts a sub array from an array.

ArrayMid( array=array, start=number, count=number );

Returns: Array

Argument Description
array
array, required

array to subtract data from

start
number, required

The position of the first element to retrieve.

count
number, optional

The number of elements to retrieve. If not set, all elements until the end of the array will be returned.

Examples

Similar to String Mid function, gets a section of an array

first argument start, second argument count

aNames = array(10412,42,33,2,999,12769,888);

dump(arrayMid(aNames,2));

//member function dump(aNames.mid(2,4));

See also