如果重复怎么处理?是否需要做区分?
如果忽略重复和反向还原,那么直接用array_merge即可
$new_arr = array_merge($arr['1'],$arr[2]);
foreach:
foreach($arr as $v=>$k){ foreach($v as $val=>$key){ $new_arr[$key] = $val; }}