Registry / utility / paquettg-php-html-parser

paquettg-php-html-parser

JSON →
library3.1.1phppackagistunverified

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

composer require paquettg/php-html-parser
INSTALL
IMPORT
SIG · PAQUETTG-PHP-HTML-
P
paquettg-php-html-parser
utilityphpv3.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Dom
use PHPHtmlParser\Dom;

Parse HTML and extract content using CSS selectors.

use PHPHtmlParser\Dom; $dom = new Dom(); $dom->loadStr('<html><body><div id="content">Hello</div></body></html>'); $content = $dom->find('#content')[0]->text; echo $content; // Outputs: Hello
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.1.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
paquettg-php-html-parser — pip install paquettg-php-html-parser · libregistry