<?php $arr1 = [ 'a' => ['gross_value' => '100', 'quantity' => '1'], 'b' => ['gross_value' => '200', 'quantity' => '1'] ]; $arr2 = [ 'b' => ['item_title_id' => '1', 'order_id' => '4'], 'a' => ['item_title_id' => '2', 'order_id' => '4'] ]; var_export( array_merge_recursive($arr1, $arr2) );
You have javascript disabled. You will not be able to edit any code.