After foreach Loop multidimensional array get courier name, to foreground assignment

Source: Internet
Author: User
Array (6) {[0]=> Array (1) {["id"]=> string (+) "1210325131249664"} [1]=> Array (1) {["id"]=> String (+) "1210365844703232"} ["Addr"]=> Array (+) {["Address"]=> string (37) "Hunan Changde Dingcheng District Aston Sahara" ["Addr    Essname "]=> string (0)" "[" Besttime "]=> string (0)" "[" City "]=> Int (199) [" Consignee "]=> String (18) "Enlarge View time period" ["Country"]=> int (1) ["District"]=> Int (1662) ["Email"]=> string (0) "" [ "id"]=> float (1200450386397207) ["Mobile"]=> string (0) "" ["Province"]=> int ["Signbuilding "]=> string (0)" "[" "Tel"]=> string (one) "13480254654" ["userId"]=> int ["ZipCode"]=> s Tring (0) ""} ["Couponlist"]=> Array (0) {} ["Logisticsid"]=> float (1200450386397207) ["OrderList"]=> arr Ay (2) {[0]=> Array (+) {["Consignee"]=> string (18) "See Time period" ["Countmoney"]=> Int (2208 ) ["CountprofitmoneY "]=> Int (188) [" Countsupmoney "]=> int (+) [" Crtime "]=> float (1435759303979) [" Di Smoney "]=> int (0) [" Freightmoney "]=> int () [" Goodtmoney "]=> Int (2188) [" Ordergood List "]=> Array (1) {[0]=> Array (8) {[" Countmoney "]=> Int (2188) [" C Type "]=> string (0)" "[" Goodid "]=> Int (15392) [" Goodimg "]=> string (8 3) "http://img02.hsz88.com.cn/imageext/t4/9ebc9ae188b0498db161ab6fbc922be7.jpg!! 200x200 "[" Goodname "]=> string (24)" Huawei P7-l07 Mobile Custom "[" Nums "]=> int (1) [" s Alemoney "]=> Int (2188) [" Sendtype "]=> string (1)" 0 "}} [" Regiondes "]=&G      T          String (21) "Hunan Changde Dingcheng District" ["Shipmlist"]=> Array (1) {[0]=> Array (3) {["Shipid"]=> Int (9) ["ShipName"]=> string (12) "Shun Fung Express" ["Shipprice"]=> int ()}} ["Status"]=> string (1) "Y" ["SUPC Ode "]=> Int (353) [" Supname "]=> string (12)" Guang Tong Technology "} [1]=> Array (+) {[" Consignee "]=&      Gt String (18) "Enlarge look time period" ["Countmoney"]=> float (159.19999999999998863) ["Countprofitmoney"]=> float (2 4.199999999999988631) ["Countsupmoney"]=> Int (135) ["Crtime"]=> float (1435759303979) ["DisM Oney "]=> float (39.799999999999997158) [" Freightmoney "]=> int (0) [" Goodtmoney "]=> Int (199 ) ["Ordergoodlist"]=> Array (1) {[0]=> Array (8) {["Countmoney"]=> Floa T (159.19999999999998863) ["CType"]=> int (1) ["Goodid"]=> int () ["Good IMG "]=> string (http://img01.hsz88.com.cn/imageext/t1/0ae44965ad864733b09d35af4894cf1d.jpg!!)" 200x200 "[" Goodname "]=> string (entech/) "ET137 304 stainless steel anti-scalding electric kettle kettle electric kettle Auto Power off" ["Nums"]=> int (1) [" Salemoney "]=> Int (199) [" Sendtype "]=> string (1)" 0 "}} [" Regiondes "]=&G      T          String (21) "Hunan Changde Dingcheng District" ["Shipmlist"]=> Array (2) {[0]=> Array (3) {["Shipid"]=>        Int (ten) ["ShipName"]=> string (12) "Yun da Express" ["Shipprice"]=> int (0)}  [1]=> Array (3) {["Shipid"]=> int (+) ["ShipName"]=> string (28) "EMS domestic post SpeedPost" ["Shipprice"]=> int (0)}} ["Status"]=> string (1) "Y" [ "Supcode"]=> int ["Supname"]=> string (15) "Good Real again Group"}}

Reply content:

Array (6) {[0]=> Array (1) {["id"]=> string (+) "1210325131249664"} [1]=> Array (1) {["id"]=> String (+) "1210365844703232"} ["Addr"]=> Array (+) {["Address"]=> string (37) "Hunan Changde Dingcheng District Aston Sahara" ["Addr    Essname "]=> string (0)" "[" Besttime "]=> string (0)" "[" City "]=> Int (199) [" Consignee "]=> String (18) "Enlarge View time period" ["Country"]=> int (1) ["District"]=> Int (1662) ["Email"]=> string (0) "" [ "id"]=> float (1200450386397207) ["Mobile"]=> string (0) "" ["Province"]=> int ["Signbuilding "]=> string (0)" "[" "Tel"]=> string (one) "13480254654" ["userId"]=> int ["ZipCode"]=> s Tring (0) ""} ["Couponlist"]=> Array (0) {} ["Logisticsid"]=> float (1200450386397207) ["OrderList"]=> arr Ay (2) {[0]=> Array (+) {["Consignee"]=> string (18) "See Time period" ["Countmoney"]=> Int (2208 ) ["CountprofitmoneY "]=> Int (188) [" Countsupmoney "]=> int (+) [" Crtime "]=> float (1435759303979) [" Di Smoney "]=> int (0) [" Freightmoney "]=> int () [" Goodtmoney "]=> Int (2188) [" Ordergood List "]=> Array (1) {[0]=> Array (8) {[" Countmoney "]=> Int (2188) [" C Type "]=> string (0)" "[" Goodid "]=> Int (15392) [" Goodimg "]=> string (8 3) "http://img02.hsz88.com.cn/imageext/t4/9ebc9ae188b0498db161ab6fbc922be7.jpg!! 200x200 "[" Goodname "]=> string (24)" Huawei P7-l07 Mobile Custom "[" Nums "]=> int (1) [" s Alemoney "]=> Int (2188) [" Sendtype "]=> string (1)" 0 "}} [" Regiondes "]=&G      T          String (21) "Hunan Changde Dingcheng District" ["Shipmlist"]=> Array (1) {[0]=> Array (3) {["Shipid"]=> Int (9) ["ShipName"]=> string (12) "Shun Fung Express" ["Shipprice"]=> int ()}} ["Status"]=> string (1) "Y" ["SUPC Ode "]=> Int (353) [" Supname "]=> string (12)" Guang Tong Technology "} [1]=> Array (+) {[" Consignee "]=&      Gt String (18) "Enlarge look time period" ["Countmoney"]=> float (159.19999999999998863) ["Countprofitmoney"]=> float (2 4.199999999999988631) ["Countsupmoney"]=> Int (135) ["Crtime"]=> float (1435759303979) ["DisM Oney "]=> float (39.799999999999997158) [" Freightmoney "]=> int (0) [" Goodtmoney "]=> Int (199 ) ["Ordergoodlist"]=> Array (1) {[0]=> Array (8) {["Countmoney"]=> Floa T (159.19999999999998863) ["CType"]=> int (1) ["Goodid"]=> int () ["Good IMG "]=> string (http://img01.hsz88.com.cn/imageext/t1/0ae44965ad864733b09d35af4894cf1d.jpg!!)" 200x200 "[" Goodname "]=> string (entech/) "ET137 304 stainless steel anti-scalding electric kettle kettle electric kettle Auto Power off" ["Nums"]=> int (1) [" Salemoney "]=> Int (199) [" Sendtype "]=> string (1)" 0 "}} [" Regiondes "]=&G      T          String (21) "Hunan Changde Dingcheng District" ["Shipmlist"]=> Array (2) {[0]=> Array (3) {["Shipid"]=>        Int (ten) ["ShipName"]=> string (12) "Yun da Express" ["Shipprice"]=> int (0)}  [1]=> Array (3) {["Shipid"]=> int (+) ["ShipName"]=> string (28) "EMS domestic post SpeedPost" ["Shipprice"]=> int (0)}} ["Status"]=> string (1) "Y" [ "Supcode"]=> int ["Supname"]=> string (15) "Good Real again Group"}}

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));//输出shipName的数组
  • Related Article

    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.