Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/06/2008, 10:48
Greco
 
Fecha de Ingreso: mayo-2002
Ubicación: En MVD
Mensajes: 34
Antigüedad: 22 años, 9 meses
Puntos: 0
De acuerdo Respuesta: Algun funcion que cambia á por a

Cita:
Iniciado por HiperJP Ver Mensaje
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!!!!!