Answer the question
In order to leave comments, you need to log in
How to return Russian text when using DOMDocument library?
There is this code:
$html = 'hello!';
$document = new DOMDocument();
$document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
echo $document->saveHTML();
<html><body><p>Добрый день!</p></body></html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question