![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/06/2008, 10:48
|
| | Fecha de Ingreso: mayo-2002 Ubicación: En MVD
Mensajes: 34
Antigüedad: 22 años, 9 meses Puntos: 0 | |
Respuesta: Algun funcion que cambia á por a Cita:
Iniciado por HiperJP Tomado de http://www.php.net/str_replace Código PHP: function unaccent($text) {
$trans = get_html_translation_table(HTML_ENTITIES); // Get the entities table into an array
foreach ($trans as $literal => $entity) { // Create two arrays, for accented and unaccented forms
if (ord($literal) >= 192){ // Don't contemplate other characters such as fractions, quotes etc
$replace[] = substr($entity,1,1); // Get 'E' from string '&Eaccute' etc.
$search[] = $literal; // Get accented form of the letter
}
}
return str_replace($search, $replace, $text);
}
Saludos Excelente q encontraste esto!!!!! |