Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/04/2003, 11:22
Avatar de Manoloweb
Manoloweb
 
Fecha de Ingreso: enero-2002
Ubicación: Monterrey
Mensajes: 2.454
Antigüedad: 24 años, 8 meses
Puntos: 5
Bueno, yo me hice esta función y trabaja bastante fácil. Así que si quieres modificarla para tus intenciones, adelante


Código PHP:
$varCaracteres = array ("/á/", "/é/", "/í/", "/ó/", "/ú/", "/ñ/", "/Á/", "/É/", "/Í/", "/Ó/", "/Ú/", "/Ñ/", "/[\n]/",);
$varCaracteresHTML = array ("&aacute;", "&eacute;", "&iacute;", "&oacute;", "&uacute;", "&ntilde;", "&Aacute;", "&Eacute;", "&Iacute;", "&Oacute;", "&Uacute;", "&Ntilde;", "<br>\r");

function 
textohtml ($texto)
    {
        
$texto = preg_replace($GLOBALS["varCaracteres"], $GLOBALS["varCaracteresHTML"], $texto); 
        return 
$texto;
    } 
Saludos
__________________
Manoloweb