I have the following function:
function tirarAcentos($string){
return preg_replace(array("/(á|à|ã|â|ä)/","/(Á|À|Ã|Â|Ä)/","/(é|è|ê|ë)/","/(É|È|Ê|Ë)/","/(í|ì|î|ï)/","/(Í|Ì|Î|Ï)/","/(ó|ò|õ|ô|ö)/","/(Ó|Ò|Õ|Ô|Ö)/","/(ú|ù|û|ü)/","/(Ú|Ù|Û|Ü)/","/(ñ)/","/(Ñ)/","/(Ç)/","/(ç)/","/(Ã)/"),explode(" ","a A e E i I o O u U n N C c A"),$string);
}
However, when trying to remove an accent from "GPA - BREAD GROUP" I can not remove the Ã, in specific, I have tried everything and it does not remove.
How can I remove it?
Follow the application:
session_register("SESSION");
header("Cache-Control: no-cache");
include('Connect.php');
include('conf.php');
include('sec.php');
$v_conexao = new MySQL($vstr_usuario,$vstr_pass,$vstr_host,$vstr_db) or die ("Can't connect with the database");
$vint_conexao=$v_conexao->Get_Connection_ID();
$ssql = "SELECT nome FROM ang_cliente ORDER BY nome ASC";
$vint_result=$v_conexao->Open_Query($vint_conexao,$ssql);
while($v_a=$v_conexao->Fetch_Into($vint_result)){
$nome_removido = tirarAcentos($v_a['nome']);
echo "Nome Atual: ".$v_a['nome']."<br>";
echo "Nome Atualizado: ".$nome_removido."<br>";
echo "<hr>";
}