I am trying to replace accented characters with the normal replacements. Below is what I am currently doing.
$string = \"Éric Cantona\";
$strict = st
So I found this on php.net page for preg_replace function
// replace accented chars
$string = "Zacarías Ferreíra"; // my definition for string variable
$accents = '/&([A-Za-z]{1,2})(grave|acute|circ|cedil|uml|lig);/';
$string_encoded = htmlentities($string,ENT_NOQUOTES,'UTF-8');
$string = preg_replace($accents,'$1',$string_encoded);
If you have encoding issues you may get someting like this "ZacarÃÂas FerreÃÂra", just decode the string and use said code above
$string = utf8_decode("ZacarÃÂas FerreÃÂra");