限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。

疑难片段

两个二维数组进行合并,输出全部数据

作者
王明昌
发布时间
最后更新
 [
        'delivery_date' => '2018-01-17',
        'target_house'  =>'快消浦西仓',
        'sort_num'      =>104,
        'sort_type'     =>'整',
    ],
    1 =>[
        'null_sort_scatter_num'=>0,
        'allot_scatter_num' =>0,
        'other_statu_full_num'  =>0,
        'other_statu_scatter_num'   =>0
        ],

];
$list1=[
    0 => [
        'delivery_date' => '2018-01-17',
        'house'  =>'浦西仓',
        'sort_num'      =>104,
        'type'     =>'整',
    ],
    1 =>[
        'null_sort_scatter_num'=>0,
        'allot_scatter_num' =>0,
        'other'  =>0,
        'other_statu'   =>0
    ],
];

$arr = array();  
foreach($list as $k=>$v){  
    $arr[] = array_merge($v,$list1[$k]);  
}  
var_dump($arr);
输出结果 两个二维数组进行合并,输出全部数据
0/500
友善分享您的看法。
反馈邮箱