我的问题很简单。 比方说,我有多个“一”:PHP简单的HTML DOM解析器:选择两个类
<td class="autoindex_td">
<a class="autoindex_a snap_shots" href="http://example.com.html">
<img height="16" width="16" src="http://exmple.com/download/index_icons/winxp/sound.png" alt="[mp3]"></img>
<strong>
05 - example.mp3
</strong>
</a>
</td>
我只是想找到“强”,这有两班。这里是我的尝试:
foreach ($html->find('a[class=autoindex_a , class=snap_shots]') as $link) {
if(isset($link)){
foreach($link->find('strong') as $tag)
{
$name = $tag->plaintext ;
$hiren[] = $name ;
}
}
}
,但我得到null
。所以,我如何选择在同一时间两类?
下一次,请进行搜索对于类似的问题发布前=> http://stackoverflow.com/questions/7387958/find-stacked-div-class-with-simple-html-dom-parser – Enissay