You might want to try html_entity_decode; -)
For instance:
$html = "this is a text";
var_dump($html);
var_dump(html_entity_decode($html, ENT_COMPAT, 'UTF-8'));
You'll get:
string 'this is a text' (length=19)
string 'this is a text' (length=15)
Please note that you may need to specify a third parameter - the encoding - if you are not working with ISO-8859-1.
source
share