Re: Acentuados
| From: | Evaristo Laguna | Date: | Tue, 09 Oct 2001 06:26:21 +0000 |
| Subject: | Re: Acentuados | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-14618@lists.php.net to get a copy of this message | ||
FUNCTION validatextos(&$variable)
{
$variable = strtr($variable, "áéíóúÁÉÍÓÚ", "aeiouAEIOU");
$variable = strtoupper($variable) ;
}
> Dimarts 09 Octubre 2001 01:25, -AzTk- dixit:
>
> > Hola a todos.
> >
> > Una pregunta, alguien sabe, o me puede auxiliar en algo, tengo
> > unas cadenas con acentos ä ë ï ö ü, á é í ó ú, como puedo
> > hacerle para que todos se pasen a vocales sin acentos?
>
> Con la función strtr():
>
> http://www.php.net/manual/en/function.strtr.php
>
> $sinacentos = strtr('äëïöüáéíóú','aeiouaeiou', $conacentos);
>
> Saludos
> Àngel
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>