Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Replace the values of the first array with the values from the second array recursively:
SUBMITTED BY:
henry1874w
DATE:
June 25, 2017, 2:44 p.m.
FORMAT:
Text only
SIZE:
166 Bytes
Raw
Download
Tweet
HITS:
216
Go to comments
Report
<?php
$a1=array("a"=>array("red"),"b"=>array("green","blue"),);
$a2=array("a"=>array("yellow"),"b"=>array("black"));
print_r(array_replace_recursive($a1,$a2));
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus