数组合并 不覆盖

array_merge_recursive()

foreach($appo as $key=>$val)
{
if(!in_array($key,$H_name))
{
$appo_n[$key]['appo'] = $appo[$key];
}
}

foreach($arrive as $key=>$val)
{
if(!in_array($key,$H_name))
{
$arrive_n[$key]['arrive'] = $arrive[$key];
}
}
dd($appo_n,'');
dd($arrive_n,'');
dd(array_merge_recursive($arrive_n,$appo_n));

posted @ 2017-11-11 10:06  zhangsima  阅读(324)  评论(0编辑  收藏  举报