0

id-任意号码

<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;
}
4

1 回答 1

0
$html->find("div[id^='news-id-']", 0)

应该管用。

于 2013-02-27T07:56:23.967 回答