时间:2021-07-01 10:21:17 帮助过:2人阅读
- XML; $obj=simplexml_load_string($xml); foreach($obj->list as $v){ $arr=(array)$v->attributes(); $arr['@attributes']['thumb']=(string)$v->thumb; $list[]=$arr['@attributes']; }; print_r($list);
thumb/1.jpg
thumb/2.jpg
thumb/1.jpg
thumb/2.jpg
thumb/1.jpg
thumb/2.jpg
thumb/1.jpg
thumb/2.jpg