fork download
  1. <?php
  2. $array1 = Array("0" => Array("data" => Array( "id" => "1", "type" => "asset", "description" => "Real Estate", "value" => "350000" ) ) );
  3.  
  4. $array2 = Array( "0" => Array ( "owners" => Array( "data" => Array( "id" => "1", "percentage" => "100") ) ) );
  5.  
  6. $array1[0]['data']['owners'] = $array2[0]['owners'];
  7.  
  8. echo "<pre>"; print_r($array1);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
<pre>Array
(
    [0] => Array
        (
            [data] => Array
                (
                    [id] => 1
                    [type] => asset
                    [description] => Real Estate
                    [value] => 350000
                    [owners] => Array
                        (
                            [data] => Array
                                (
                                    [id] => 1
                                    [percentage] => 100
                                )

                        )

                )

        )

)