ArrayMid()
Extracts a sub array from an array.
ArrayMid( array=array, start=number, count=number );
Returns: Array
| Argument | Description |
|---|---|
|
array
array,
required
|
edit
array to subtract data from |
|
start
number,
required
|
edit
The position of the first element to retrieve. |
|
count
number,
optional
|
edit
The number of elements to retrieve. If not set, all elements until the end of the array will be returned. |
Examples
editSimilar 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
- Arrays
- array.mid()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)