I have an array:
$enderecos = array( 'Endereço', 'Endereco', 'Endereço ' );
I use the fgetcsv
function to read my CSV, I check the csv header by comparing if the header is included in the array.
if(in_array($colunas_csv, $enderecos))
{
$endereco_posicao = $key;
}
Where $colunas_csv
is the return of the header, what happens is that if the returned header is Endereco
the check occurs, but if Endereço
does not occur, due to Ç
.