首頁 > 後端開發 > php教程 > 数结合并

数结合并

WBOY
發布: 2016-06-13 12:39:13
原創
860 人瀏覽過

数组合并
2个数组:

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


求达到合并的效果:
<br />
array (<br />
'0' =><br />
array (<br />
  'stock_no' => 'SU13080800340',<br />
  'adress' => 'B',<br />
  'arr_time' => '2013-08-14 09:00:00',<br />
  'c_type' => 'P32E',<br />
  'cust_no' => '310F61VA5A',<br />
  'mount_total' => '3',<br />
  'total' => '48',<br />
  'c1_time' => '2013-08-10 15:00:00',<br />
  'packageno' => 'CVT121015001',<br />
),<br />
'1' =><br />
array (<br />
  'stock_no' => 'SU13080800340',<br />
  'adress' => 'B',<br />
  'arr_time' => '2013-08-14 09:00:00',<br />
  'c_type' => 'P32E',<br />
  'cust_no' => '310F61VA5A',<br />
  'mount_total' => '3',<br />
  'total' => '48',<br />
  'c1_time' => '2013-08-10 15:00:00',<br />
  'packageno' => 'CVT121015002',<br />
),<br />
'2' =><br />
array (<br />
  'stock_no' => 'SU13080800340',<br />
  'adress' => 'B',<br />
  'arr_time' => '2013-08-14 09:00:00',<br />
  'c_type' => 'P32E',<br />
  'cust_no' => '310F61VA5A',<br />
  'mount_total' => '3',<br />
  'total' => '48',<br />
  'c1_time' => '2013-08-10 15:00:00',<br />
  'packageno' => 'CVT121016001',<br />
),<br />
)<br />
登入後複製

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板