PHP将XML文件转换成PHP数组 前提是有一个test.xml文件 <?php $s=join("",file('test.xml')); $result = xml_to_array($s); function xml_to_array($xml) {