【发布时间】:2013-12-26 15:56:22
【问题描述】:
当从这段代码中获取外部数据(例如作者姓名或网站名称)时,我想从 simple_html_dom 中删除一些单词:`
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
include('simple_html_dom.php');
$html = new simple_html_dom();
// Create DOM from URL or file
$html = file_get_html('http://www.example.com');
$myContent = $html->find('table', 0)->plaintext;
echo $myContent;
我不知道怎么做(从url的表中删除流动代码)
<tr style="background: #ffd700;color:black;">
<td colspan="5">**delete this words from table..**
</td></tr>
【问题讨论】:
-
也许看到这个答案,应该可以帮助你stackoverflow.com/questions/17691175/…
-
请告诉我更多我无法为我的问题设置价值
标签: php html curl get html-parsing