array_merge_recursive in php

PHP
// array_merge_recursive function in php

<?php
$a1=array(color=>"red","green");
$a2=array(color=>"blue","yellow");
print_r(array_merge_recursive($a1,$a2));
?>

//OUTPUT
Array ( [color] => Array ( [0] => red [1] => blue ) [0] => green [1] => yellow )
Source

Also in PHP: