【发布时间】:2013-01-17 05:36:37
【问题描述】:
我正在尝试从<font size="3" color="blue"> 中获取纯文本...它没有获取字体标签,尽管如果我这样做它确实有效 "font", 3 但有网站中有很多字体标签,我想让搜索更具体一些。一个标签可以有多个属性吗?
<?php
include('simple_html_dom.php');
$html = new simple_html_dom();
$html = file_get_html('http://cwheel.domain.com/');
##### <font size="3" color="blue">Certified Genuine</font>
$element = $html->find("font[size=3][color=blue]", 0);
echo $element-> plaintext . '<br>';
$html->clear();
?>
【问题讨论】:
标签: php simple-html-dom