array merge recursive in php

Solutions on MaxInterview for array merge recursive in php by the best coders in the world

showing results for - "array merge recursive in php"
Valentín
04 Jun 2017
1// array_merge_recursive function in php
2
3<?php
4$a1=array(color=>"red","green");
5$a2=array(color=>"blue","yellow");
6print_r(array_merge_recursive($a1,$a2));
7?>
8
9//OUTPUT
10Array ( [color] => Array ( [0] => red [1] => blue ) [0] => green [1] => yellow )