使用PHP Simple HTML DOM Parser获取评论

Bcl*_*l00 2 php parsing dom html-parsing

我正在使用PHP Simple HTML DOM Parser.

我想知道是否有可能提取HTML评论(<!-- -->).

你能?

Pau*_*ert 5

直接来自他们的文档:

// Find all comment (<!--...-->) blocks 
$es = $html->find('comment');
Run Code Online (Sandbox Code Playgroud)

http://simplehtmldom.sourceforge.net/manual.htm