跪求大侠帮助 php获取xml节点数据的小问题
小弟太菜了,我想获取
数据代码如下:
------解决方案--------------------
页面并没有看到PHP code
$xml=
<postage_get_response><postage><ems_increase>8.0</ems_increase><ems_price>22.0</ems_price><express_increase>3.0</express_increase><express_price>8.0</express_price><name>快递</name><postage_id>41864647</postage_id><postage_modes list="true"><postage_mode><dests>440000</dests><id>181030917</id><increase>3.0</increase><price>10.0</price><type>ems</type></postage_mode><postage_mode><dests>130000,360000,500000,460000,370000,530000,520000,340000,510000,420000,450000,410000,110000,120000,430000,350000</dests><id>181030918</id><increase>5.0</increase><price>15.0</price><type>express</type></postage_mode></postage_modes></postage></postage_get_response>
xml;
$con=simplexml_load_string($xml);
print_r($con); <div class="clear"></div>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号