After foreach, obtain the delivery name through a multi-dimensional array and assign a value to the foreground.

Source: Internet
Author: User
{Code ...}
Array (6) {[0] => array (1) {["id"] => string (16) "1210325131249664"} [1] => array (1) {["id"] => string (16) "1210365844703232"} ["addr"] => array (15) {["address"] => string (37) "Aston Saida, Changde City, Hunan Province" ["addressName"] => string (0) "" ["bestTime"] => string (0) "" ["city"] => int (199) ["consignee"] => string (18) "increase the viewing time range" ["country"] => int (1) ["district"] => int (1662) ["email"] => string (0) "" ["id"] => float (1200450386397207) ["mobile"] => string (0) "" ["province"] => int (14) ["signBuilding"] => string (0) "" ["tel"] => string (11) "13480254654" ["userId"] => int (19) ["zipcode"] => string (0) ""} ["couponList"] => array (0) {} ["logisticsId"] => float (1200450386397207) ["orderList"] => array (2) {[0] => array (14) {["consignee"] => string (18) "increase viewing time range" ["countMoney"] => int (2208) ["countProfitMoney"] => int (188) ["countSupMoney"] => int (2000) ["crtime"] => float (1435759303979) ["disMoney"] => int (0) ["freightMoney"] => int (20) ["goodtMoney"] => int (2188) ["orderGoodList"] => array (1) {[0] => array (8) {["countMoney"] => int (2188) ["ctype"] => string (0) "" ["goodId"] => int (15392) ["goodImg"] => string (83 )" http://img02.hsz88.com.cn/ImageExt/t4/9ebc9ae188b0498db161ab6fbc922be7.jpg!!200x200 "[" GoodName "] => string (24)" Huawei P7-L07 mobile Customization "[" nums "] => int (1) [" saleMoney "] => int (2188) ["sendType"] => string (1) "0"} ["regionDes"] => string (21) "Changde Dingcheng District, Hunan Province" ["shipMList"] => array (1) {[0] => array (3) {["shipId"] => int (9) ["shipName"] => string (12) "SF Express" ["shipPrice"] => int (20)} ["status"] => string (1) "Y" ["supCode"] => int (353) ["supName"] => string (12) "Guang Tong technology"} [1] => array (14) {["consignee"] => string (18) "increase viewing time range" ["countMoney"] => float (159.19999999999998863) ["countProfitMoney"] => float (24.199999999999988631) ["countSupMoney"] => int (135) ["crtime"] => float (1435759303979) ["disMoney"] => float (39.799999999999997158) ["freightMoney"] => int (0) ["goodtMoney"] => int (199) ["orderGoodList"] => array (1) {[0] => array (8) {["countMoney"] => float (159.19999999999998863) ["ctype"] => int (1) ["goodId"] => int (76) ["goodImg"] => string (83 )" http://img01.hsz88.com.cn/ImageExt/t1/0ae44965ad864733b09d35af4894cf1d.jpg!!200x200 "[" GoodName "] => string (88)" EnTech/special etouch 304 stainless steel heat-proof electric kettle auto power free shipping "[" nums "] => int (1) ["saleMoney"] => int (199) ["sendType"] => string (1) "0"} ["regionDes"] => string (21) "Changde Dingcheng District, Hunan Province" ["shipMList"] => array (2) {[0] => array (3) {["shipId"] => int (10) ["shipName"] => string (12) "yunda Express" ["shipPrice"] => int (0)} [1] => array (3) {["shipId"] => int (14) ["shipName"] => string (28) "EMS China Post Express Delivery" ["shipPrice"] => int (0)} ["status"] => string (1) "Y" ["supCode"] => int (23) ["supName"] => string (15) "haoshi regroup "}}}

Reply content:
Array (6) {[0] => array (1) {["id"] => string (16) "1210325131249664"} [1] => array (1) {["id"] => string (16) "1210365844703232"} ["addr"] => array (15) {["address"] => string (37) "Aston Saida, Changde City, Hunan Province" ["addressName"] => string (0) "" ["bestTime"] => string (0) "" ["city"] => int (199) ["consignee"] => string (18) "increase the viewing time range" ["country"] => int (1) ["district"] => int (1662) ["email"] => string (0) "" ["id"] => float (1200450386397207) ["mobile"] => string (0) "" ["province"] => int (14) ["signBuilding"] => string (0) "" ["tel"] => string (11) "13480254654" ["userId"] => int (19) ["zipcode"] => string (0) ""} ["couponList"] => array (0) {} ["logisticsId"] => float (1200450386397207) ["orderList"] => array (2) {[0] => array (14) {["consignee"] => string (18) "increase viewing time range" ["countMoney"] => int (2208) ["countProfitMoney"] => int (188) ["countSupMoney"] => int (2000) ["crtime"] => float (1435759303979) ["disMoney"] => int (0) ["freightMoney"] => int (20) ["goodtMoney"] => int (2188) ["orderGoodList"] => array (1) {[0] => array (8) {["countMoney"] => int (2188) ["ctype"] => string (0) "" ["goodId"] => int (15392) ["goodImg"] => string (83 )" http://img02.hsz88.com.cn/ImageExt/t4/9ebc9ae188b0498db161ab6fbc922be7.jpg!!200x200 "[" GoodName "] => string (24)" Huawei P7-L07 mobile Customization "[" nums "] => int (1) [" saleMoney "] => int (2188) ["sendType"] => string (1) "0"} ["regionDes"] => string (21) "Changde Dingcheng District, Hunan Province" ["shipMList"] => array (1) {[0] => array (3) {["shipId"] => int (9) ["shipName"] => string (12) "SF Express" ["shipPrice"] => int (20)} ["status"] => string (1) "Y" ["supCode"] => int (353) ["supName"] => string (12) "Guang Tong technology"} [1] => array (14) {["consignee"] => string (18) "increase viewing time range" ["countMoney"] => float (159.19999999999998863) ["countProfitMoney"] => float (24.199999999999988631) ["countSupMoney"] => int (135) ["crtime"] => float (1435759303979) ["disMoney"] => float (39.799999999999997158) ["freightMoney"] => int (0) ["goodtMoney"] => int (199) ["orderGoodList"] => array (1) {[0] => array (8) {["countMoney"] => float (159.19999999999998863) ["ctype"] => int (1) ["goodId"] => int (76) ["goodImg"] => string (83 )" http://img01.hsz88.com.cn/ImageExt/t1/0ae44965ad864733b09d35af4894cf1d.jpg!!200x200 "[" GoodName "] => string (88)" EnTech/special etouch 304 stainless steel heat-proof electric kettle auto power free shipping "[" nums "] => int (1) ["saleMoney"] => int (199) ["sendType"] => string (1) "0"} ["regionDes"] => string (21) "Changde Dingcheng District, Hunan Province" ["shipMList"] => array (2) {[0] => array (3) {["shipId"] => int (10) ["shipName"] => string (12) "yunda Express" ["shipPrice"] => int (0)} [1] => array (3) {["shipId"] => int (14) ["shipName"] => string (28) "EMS China Post Express Delivery" ["shipPrice"] => int (0)} ["status"] => string (1) "Y" ["supCode"] => int (23) ["supName"] => string (15) "haoshi regroup "}}}

phpFunction arr_ecshop ($ arr) {static $ tmp = array (); if (! Is_array ($ arr) {return false;} foreach ($ arr as $ key => $ val) {if (is_array ($ val) {arr_ecshop ($ val );} else {$ key = 'shipname' & $ tmp [$ key] [] = $ val;} return $ tmp;} print_r (arr_ecshop ($ arr )); // output the array of shipName

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.