Skip to content

Instantly share code, notes, and snippets.

@antoniogarcia78
Created April 19, 2016 10:38
Show Gist options
  • Save antoniogarcia78/3a063972cb3cc6f1615fe8b12861eb77 to your computer and use it in GitHub Desktop.
Save antoniogarcia78/3a063972cb3cc6f1615fe8b12861eb77 to your computer and use it in GitHub Desktop.
function limpiarAcentos($cadena) {
$conAcento = array('á','à','â','è','é','ê','í','î','ì','ó','ò','ô','ú','ù','û',
'Á','À','Â','È','É','Ê','Í','Î','Ì','Ó','Ò','Ô','Ú','Ù','Û');
$sinAcento = array('a','a','a','e','e','e','i','i','i','o','o','o','u','u','u',
'A','A','A','E','E','E','I','I','I','O','O','O','U','U','U');
return str_replace($conAcento,$sinAcento,$cadena);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment