fork(18) download
  1. <?php
  2.  
  3. $arr = array(
  4. array('data' => array(
  5. 'v1' => 1,
  6. 'v2' => 2,
  7. 'foo' => array(62)
  8. )),
  9. array('data' => array(
  10. 'v3' => 3,
  11. 'v4' => 4,
  12. 'foo' => array(52)
  13. ))
  14. );
  15.  
  16. print_r(call_user_func_array('array_merge_recursive', $arr));
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [data] => Array
        (
            [v1] => 1
            [v2] => 2
            [foo] => Array
                (
                    [0] => 62
                    [1] => 52
                )

            [v3] => 3
            [v4] => 4
        )

)