- htmlentities: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
$orig = "Qébeq";
$a = htmlentities($orig);
$b = html_entity_decode($a);
echo $a; // I'll "walk" the <b>dog</b> now
echo "\n";
echo $b; // I'll "walk" the <b>dog</b> now
?>