【发布时间】:2011-07-04 20:39:00
【问题描述】:
可能的重复:
crawling a html page using php?
Best methods to parse HTML
我的 php 脚本中有一个字符串变量,它包含 html 页面。我如何从这个字符串中提取 DOM 元素?
例如,在这个字符串'<div class="someclass">text</div>' 中,我希望得到变量'text'。我该怎么做?
【问题讨论】:
标签: php html string domdocument