0
我想從下面的HTML中獲得<b>Author:</b>
和<br>
之間的內容,使用preg_match_all
函數,但是它一直返回空數組。我需要中間行HTML輸出,請幫助我。Preg_match_all和html標記
這裏的文字:
<b>Author:</b> <a href="http://link.com" target="_blank" rel="nofollow">Name</a><br />
這是我使用的腳本:
preg_match_all("'<b>Author:</b> ([^<]*)<br />'", $page, $preg_author);
$author = $preg_author[1];
print_r($preg_author);
它的工作原理!非常感謝你。 – Hubertoss
所以你可以標記我的答案爲接受;) – malko