Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Differences between array_replace() and array_replace_recursive():
SUBMITTED BY:
henry1874w
DATE:
June 25, 2017, 2:45 p.m.
FORMAT:
Text only
SIZE:
240 Bytes
Raw
Download
Tweet
HITS:
262
Go to comments
Report
<?php
$a1=array("a"=>array("red"),"b"=>array("green","blue"),);
$a2=array("a"=>array("yellow"),"b"=>array("black"));
$result=array_replace_recursive($a1,$a2);
print_r($result);
$result=array_replace($a1,$a2);
print_r($result);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus