欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

数结合并

程序员文章站 2022-06-07 19:42:47
...
数组合并
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',
),
)

网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • 数结合并
  • 专题推荐

    作者信息
    数结合并

    认证0级讲师

    推荐视频教程
  • 数结合并javascript初级视频教程
  • 数结合并jquery 基础视频教程
  • 视频教程分类