A nice function :
/**
* Strip accents
*
* @param string $str string to clean
* @param string $encoding encoding type (example : utf-8, ISO-8859-1 ...)
*/
function strip_accents($str, $encoding='utf-8') {
// transforme accents chars in entities
$str = htmlentities($str, ENT_NOQUOTES, $encoding);
// replace entities to have the first nice char
// Example : "&ecute;" => "e", "&Ecute;" => "E", "Ã " => "a" ...
$str = preg_replace('#&([A-za-z])(?:acute|grave|cedil|circ|orn|ring|slash|th|tilde|uml);#', '\1', $str);
// Replace ligatures like : Œ, Æ ...
// Example "Å“" => "oe"
$str = preg_replace('#&([A-za-z]{2})(?:lig);#', '\1', $str);
// Delete else
$str = preg_replace('#&[^;]+;#', '', $str);
return $str;
}
// Example
$texte = 'Ça va mon cœur adoré?';
echo suppr_accents($texte);
// Output : "Ca va mon coeur adore?"
Source : http://www.infowebmaster.fr/tutoriel/php-enlever-accents