id-any number
<div id="news-id-1" style="display:inline;"></div>
<div id="news-id-31" style="display:inline;"></div>
<div id="news-id-320" style="display:inline;"></div>
如何做到这一点? (谷歌翻译)
foreach ($html->find('div[id=news-id-?????]', 0) as $e2) { echo $e2; }
答案 0 :(得分:0)
$html->find("div[id^='news-id-']", 0)
应该有用。