"16","weight"=>"50","height"=>"160"),    array("name"=>"李">
当前位置:Gxlcms > JavaScript > jsajax经典实例之解析xml

jsajax经典实例之解析xml

时间:2021-07-01 10:21:17 帮助过:10人阅读

test.php文件代码如下:




js ajax经典实例之解析xml


xml.php文件代码如下:

"张三","age"=>"16","weight"=>"50","height"=>"160"),
    array("name"=>"李四","age"=>"17","weight"=>"51","height"=>"165"),
    array("name"=>"王二","age"=>"18","weight"=>"55","height"=>"170"),
    array("name"=>"javior","age"=>"20","weight"=>"68","height"=>"179")
);
$xml="";
$xml.="";
foreach($arr as $k=>$v){
    $xml.="";
    $xml.="".$v["name"]."";
    $xml.="".$v["age"]."";
    $xml.="".$v["weight"]."";
    $xml.="".$v["height"]."";
    $xml.="";
}
$xml.="";
echo $xml;
?> 

人气教程排行