<?php $arr1 = array( 'someKey' => [1,2,3,4,5],);$arr2 = array( 'someKey' => [6,7],); var_dump(array_merge_recursive($arr1, $arr2));
Standard input is empty
array(1) { ["someKey"]=> array(7) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) [4]=> int(5) [5]=> int(6) [6]=> int(7) } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!