"Qualifiers->ItemCondition", "ItemSubcondition" =>"Qual"/> "Qualifiers->ItemCondition", "ItemSubcondition" =>"Qual">
首頁 > 後端開發 > php教程 > 多个foreach嵌套循环的有关问题

多个foreach嵌套循环的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
發布: 2016-06-13 12:06:28
原創
1212 人瀏覽過

多个foreach嵌套循环的问题

<br />$xml = simplexml_load_file($xml_uri);<br /><br />$offer_url=array(<br />					"ItemCondition"					=>"Qualifiers->ItemCondition",<br />					"ItemSubcondition"				=>"Qualifiers->ItemSubcondition",<br />					"FulfillmentChannel"			=>"Qualifiers->FulfillmentChannel",<br />					"ShipsDomestically"				=>"Qualifiers->ShipsDomestically",<br />					"ShippingTime"					=>"Qualifiers->ShippingTime->Max",<br />					"SellerPositiveFeedbackRating"	=>"Qualifiers->SellerPositiveFeedbackRating",<br />					"NumberOfOfferListingsConsidered"=>"NumberOfOfferListingsConsidered",<br />					"SellerFeedbackCount"			=>"SellerFeedbackCount",<br />					"LandedPrice"					=>"Price->LandedPrice->Amount",<br />					"ListingPrice"					=>"Price->ListingPrice->Amount",<br />					"Shipping"						=>"Price->Shipping->Amount",<br />					"MultipleOffersAtLowestPrice"	=>"MultipleOffersAtLowestPrice"<br /><br />);<br /><br />foreach($xml->GetLowestOfferListingsForASINResult->Product->LowestOfferListings->LowestOfferListing as $key)<br />{<br />foreach($offer_url as $name=>$value)<br />{<br />echo  $name."->".$key->$value."--------";<br /><br />}<br />echo "<br>";<br />}<br />  } <br />    ?><br />
登入後複製


$key->$value没有结果,请问应该怎么写??
------解决思路----------------------
echo eval("return \$key->$value;");

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
javascript - js正規符合特定字串
來自於 1970-01-01 08:00:00
0
0
0
為什麼說非物件呼叫成員函數fetch()
來自於 1970-01-01 08:00:00
0
0
0
資料庫設定檔必須要用二維數組
來自於 1970-01-01 08:00:00
0
0
0
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板