Source Code:
(back to article)
<?php $array1 = array("color" => array("favorite" => "red"), 2, 4); $array2 = array("a", "b", "color" => array("favorite" => "green"), "shape" => "rectangle", 4); $result = array_merge_recursive($array1, $array2); print_r($result); ?>
Result:
Report an issue