Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Remove elements from an array and replace it with new elements:
SUBMITTED BY:
henry1874w
DATE:
June 26, 2017, 4:41 p.m.
FORMAT:
Text only
SIZE:
156 Bytes
Raw
Download
Tweet
HITS:
206
Go to comments
Report
<?php
$a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");
$a2=array("a"=>"purple","b"=>"orange");
array_splice($a1,0,2,$a2);
print_r($a1);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus