Last active
December 30, 2015 06:29
-
-
Save starlightsys/7790010 to your computer and use it in GitHub Desktop.
How to load a UTF-8 HTML document into the PHP DOM.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$dom = new DOMDocument('1.0', 'utf-8'); | |
@$dom->loadHTML( mb_convert_encoding($htmldoc, 'HTML-ENTITIES', 'UTF-8') ); | |
$x = new DOMXPath($dom); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment