2013年12月4日

利用正则将xml数据解析为数组

摘要: function xml_to_array( $xml ){ $reg = '/]*>([\x00-\xFF]*)/'; if(preg_match_all($reg, $xml, $matches)) { $count = count($matches[0]); for($i = 0; $i < $count; $i++) { $subxml= $matches[2][$i]; $key = $matches[1][$i]; if(preg_match( $reg, ... 阅读全文

posted @ 2013-12-04 14:42 cofday 阅读(192) 评论(0) 推荐(0) 编辑

导航