Mega Code Archive
Categories
/
Php
/
Data Type
Replace the third and fourth elements with new elements
$pasta = array ("1", "2", "3","4","5","6","7"); $pasta = array_splice($pasta, 5, 2, array("element1", "element2")); print_r($pasta); ?>