日期:2014-05-17  浏览次数:20553 次

数组合并
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',
),
)