---
name: "BIS_fnc_arrayInsert"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_arrayInsert
revid: 327948
updated: 2022-07-13T12:52:47Z
---

# BIS_fnc_arrayInsert

*Function · Arrays · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned.

## Syntax

```sqf
[array1, array2, index] call BIS_fnc_arrayInsert
```

**Parameters:**

- `array1`: [Array](../topics/Array.md) - array to insert into
- `array2`: [Array](../topics/Array.md) - array to be inserted
- `index`: [Number](../topics/Number.md) - insertion index

**Returns:** [Array](../topics/Array.md) - a new array

## Examples

### Example 1

```sqf
private _result = [[0,1,2,3,4], ["a","b","c"], 1] call BIS_fnc_arrayInsert; // returns [0,"a","b","c",1,2,3,4]
```

<sub>Source: [BI Community Wiki — BIS fnc arrayInsert](https://community.bistudio.com/wiki/BIS_fnc_arrayInsert) (revision 327948).</sub>
