怎么样用ThinkPHP程序把这样的二维数组变一维数组 10
Array([0]=>Array([order_id]=>55[order_meet_type]=>1[order_time]=>2012-06-16[order_rec...
Array
(
[0] => Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_salesman] =>
[order_sales_phone] =>
[order_purch_address] =>
[order_purch_person] =>
[order_purch_phone] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_delivery] =>
[order_deli_address] =>
[order_rece_name] =>
[order_rece_phone] =>
[order_deli_prove] =>
[order_other] =>
[order_competent] => 2
[order_fina] => 3
[order_single_system] =>
[order_pro_competent] => 4
[order_deli_time] => 0000-00-00
[order_abnormal] =>
[order_pro_id] => 36
[order_pro_xuhao] => 1
[order_pro_number] => 200010
[order_pro_pid] => 3
[order_pro_unit] => kg
[order_pro_amount] => 0
[order_single_price] => 0.00
[order_pro_money] => 0.00
)
[1] => Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_salesman] =>
[order_sales_phone] =>
[order_purch_address] =>
[order_purch_person] =>
[order_purch_phone] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_delivery] =>
[order_deli_address] =>
[order_rece_name] =>
[order_rece_phone] =>
[order_deli_prove] =>
[order_other] =>
[order_competent] => 2
[order_fina] => 3
[order_single_system] =>
[order_pro_competent] => 4
[order_deli_time] => 0000-00-00
[order_abnormal] =>
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
[order_single_price] => 0.00
[order_pro_money] => 0.00
)
)
这里是一个订单下的两个商品信息,我主要获取二维数组array[0]和array[1]里面的信息,转成一个一维数组,效果如下
Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_pro_competent] => 4
以上是这个订单的信息
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
这部分是第一个商品的信息
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
这是第二个商品的信息
)
效果基本是这样的,请各位帮忙解决一下,成分感谢!字数太多,格式可能有点乱,有些内容不全,但是效果基本是这样的 展开
(
[0] => Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_salesman] =>
[order_sales_phone] =>
[order_purch_address] =>
[order_purch_person] =>
[order_purch_phone] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_delivery] =>
[order_deli_address] =>
[order_rece_name] =>
[order_rece_phone] =>
[order_deli_prove] =>
[order_other] =>
[order_competent] => 2
[order_fina] => 3
[order_single_system] =>
[order_pro_competent] => 4
[order_deli_time] => 0000-00-00
[order_abnormal] =>
[order_pro_id] => 36
[order_pro_xuhao] => 1
[order_pro_number] => 200010
[order_pro_pid] => 3
[order_pro_unit] => kg
[order_pro_amount] => 0
[order_single_price] => 0.00
[order_pro_money] => 0.00
)
[1] => Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_salesman] =>
[order_sales_phone] =>
[order_purch_address] =>
[order_purch_person] =>
[order_purch_phone] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_delivery] =>
[order_deli_address] =>
[order_rece_name] =>
[order_rece_phone] =>
[order_deli_prove] =>
[order_other] =>
[order_competent] => 2
[order_fina] => 3
[order_single_system] =>
[order_pro_competent] => 4
[order_deli_time] => 0000-00-00
[order_abnormal] =>
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
[order_single_price] => 0.00
[order_pro_money] => 0.00
)
)
这里是一个订单下的两个商品信息,我主要获取二维数组array[0]和array[1]里面的信息,转成一个一维数组,效果如下
Array
(
[order_id] => 55
[order_meet_type] => 1
[order_time] => 2012-06-16
[order_rece_number] =>
[order_department] =>
[order_order_note] =>
[order_total_price] => 0.00
[order_produce] =>
[order_package] => 0
[order_transport] => 1
[order_shipway] => 0
[order_payment] => 1
[order_invoice] => 1
[order_pro_competent] => 4
以上是这个订单的信息
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
这部分是第一个商品的信息
[order_pro_id] => 37
[order_pro_xuhao] => 2
[order_pro_number] => 200011
[order_pro_pid] => 4
[order_pro_unit] => kg
[order_pro_amount] => 0
这是第二个商品的信息
)
效果基本是这样的,请各位帮忙解决一下,成分感谢!字数太多,格式可能有点乱,有些内容不全,但是效果基本是这样的 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询