当前位置:Gxlcms > PHP教程 > 数结合并

数结合并

时间:2021-07-01 10:21:17 帮助过:13人阅读

数组合并
2个数组:

//数组a
array (
'SU13080800340' =>
array (
0 => 'CVT121015001',
1 => 'CVT121015002',
2 => 'CVT121226001',
),
)
//数组b
array (
'stock_no' => 'SU13080800340',
'adress' => 'B',
'arr_time' => '2013-08-14 09:00:00',
'c_type' => 'P32E',
'cust_no' => '310F61VA5A',
'mount_total' => '3',
'total' => '48',
'c1_time' => '2013-08-10 15:00:00',
)


求达到合并的效果:

array (
'0' =>
array (
'stock_no' => 'SU13080800340',
'adress' => 'B',
'arr_time' => '2013-08-14 09:00:00',
'c_type' => 'P32E',
'cust_no' => '310F61VA5A',
'mount_total' => '3',
'total' => '48',
'c1_time' => '2013-08-10 15:00:00',
'packageno' => 'CVT121015001',
),
'1' =>
array (
'stock_no' => 'SU13080800340',
'adress' => 'B',
'arr_time' => '2013-08-14 09:00:00',
'c_type' => 'P32E',
'cust_no' => '310F61VA5A',
'mount_total' => '3',
'total' => '48',
'c1_time' => '2013-08-10 15:00:00',
'packageno' => 'CVT121015002',
),
'2' =>
array (
'stock_no' => 'SU13080800340',
'adress' => 'B',
'arr_time' => '2013-08-14 09:00:00',
'c_type' => 'P32E',
'cust_no' => '310F61VA5A',
'mount_total' => '3',
'total' => '48',
'c1_time' => '2013-08-10 15:00:00',
'packageno' => 'CVT121016001',
),
)

分享到:

人气教程排行