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