splice()
The splice() method remove a portion of the array and replace it with something else
Example.php
Syntax
Parameter
$offset
The index at which to start changing the array.
Length of array to be removed
Default is
NULL
. If is null, It replaced tocount($array)-$offest
.Values to replace. If if empty, Removes elements in the selected range.
Return value
The array consisting of the extracted elements.
Prefixing
References
Last updated