Mira esta función,
Código PHP:
<?php function convertir_especiales_html($str){
if (!isset($GLOBALS["carateres_latinos"])){
$todas = get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES);
$etiquetas = get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES);
$GLOBALS["carateres_latinos"] = array_diff($todas, $etiquetas);
}
$str = strtr($str, $GLOBALS["carateres_latinos"]);
return $str;
} ?>
Saludos