Allows to give multiple replacements at once::
Array.splice(array, 3, 2, 'a', 'b')
public splice ( array $array, integer $offset, integer $length = 1, mixed $replacements = null ) : array | ||
$array | array | |
$offset | integer | Index of the first element to remove |
$length | integer | Number of elements to remove |
$replacements | mixed | Elements to insert instead of the removed range |
return | array | The array with removed and replaced elements |