开发者

Using Regex span id and get contents help

I nee开发者_高级运维d Regex this <span id="more-186483"> Number 186483 is constantly changing, for each item is different.


$html = file_get_contents("http://site.com/file.html");

preg_match_all('%<span id="more-.*?">(.*?)</span>%i', $html, $result, PREG_PATTERN_ORDER);
for ($i = 0; $i < count($result[0]); $i++) {
    echo $result[1][$i];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜