Source Code:
(back to article)
<?php $arr1 = [ 'w3docs', // [0] 'for', // [1] 'w3docs', // [2] ]; // remove item at index 1 which is 'for' array_splice($arr1, 1, 1); // Print modified array var_dump($arr1);
Result:
Report an issue