Skip to main content
7 events
when toggle format what by license comment
Aug 11, 2014 at 17:08 comment added johanpw The @ is a PHP error control operator, forcing any possible error to be ignored. loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')) will force UTF-8 encoding, it might not be necessary, but as I often work with Norwegian characters (æ, ø, å), I add this to avoid garbled letters (like ü¥ó).
Aug 11, 2014 at 15:20 comment added Bogowoe Thank you, that worked fine. What is the @ before $dom->loadHTML mean, and why are you using $dom->loadHtml(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); instead of just $dom->loadHtml($content)
Aug 11, 2014 at 15:16 vote accept Bogowoe
Aug 11, 2014 at 11:44 comment added johanpw Yes, good observation (and silly mistake)... thank you, fixed it now.
Aug 11, 2014 at 11:44 history edited johanpw CC BY-SA 3.0
added 87 characters in body
Aug 11, 2014 at 4:25 comment added David Fritsch I think that you're missing a $dom->loadHtml($content) in there somewhere.
Aug 11, 2014 at 2:29 history answered johanpw CC BY-SA 3.0