复制代码 代码如下:$url = “http://list.taobao.com/browse/cat-0.htm”; $html = file_get_contents($url); echo ‘<meta charset=”UTF-8′′>’; $pattern=’/\(.*?)\<\/a\>/’; preg_match_all($pattern, $html, $array, PREG_SET