<?PHPfunctionXmlToArray2 ($xml) { //Convert XML to array $array _data= Json_decode (Json_encode (simplexml_load_string($xml, ' SimpleXMLElement ', libxml_nocdata),true); return $array _data;}? ><! DOCTYPE html Public"-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >class= "notice" > Hint: for example, take the example of pushing customs, XML online conversion array </p> <pre> <PHP$xml= "<xml> <appid>wx2421b1c4370ec43b</appid> <customs>ZHENGZHOU_BS</customs> <mch _customs_no>d00411</mch_customs_no> <mch_id>1262544101</mch_id> <order_fee>13110</ Order_fee> <out_trade_no>15112496832609</out_trade_no> <product_fee>13110</product_fee > <sign>8FF6CEF879FB9555CD580222E671E9D4</sign> <transaction_id> 1006930610201511241751403478</transaction_id> <transport_fee>0</transport_fee> <fee_type >CNY</fee_type> <sub_order_no>15112496832609001</sub_order_no></xml>"; Var_dump(XmlToArray2 ($xml)); ?> </pre> </div> </body>Center;} . vad a {display:inline-block; height:36px; line-height:36px; margin:0 5px; padding:0 50px; font-size:14px;
Text-align:center; Color#eee; text-decoration:none; Background-color: #222;}. VAD a:hover {color:#FFF; Background-color: #000;}. thead {width:728px; height:90px; margin:0 auto; border-bottom:40px solid#FFF;}</style>
XML Conversion Array method