function xml2arr($xml){ $str = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $json = json_encode($str); $arr = json_decode($json, true); return $arr; }
function xml2arr($xml){
$str = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
$json = json_encode($str);
$arr = json_decode($json, true);
return $arr;
}
返回上一页 返回【PHP程序交流】