# ArrayMid()

Extracts a sub array from an array.

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

**Returns:** array

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| array | array | Yes | array to subtract data from |  |
| start | number | Yes | The position of the first element to retrieve. |  |
| count | number | No | 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

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

dump(arrayMid(aNames,2));

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







# Categories

[Arrays](../../categories/array.md)

# See Also

[array.mid()](../objects/array/mid.md)