1
I have the following situation, the text below it has the following words ATENÇÃO:
and será
that in turn they are accented, they should be removed from the text but due to accents I cannot remove.
$string = "ATENÇÃO: O produto será revisado e constatado o defeito será";
$remover = array ("ATENÇÃO:","será");
echo $texto = str_replace("$remover","",$string);
Expected result.
The product reviewed and found the defect
Even apart the double quotes I do not have the expected result.
– CristianeBaill
Can you put all the code you are testing, what are inside the php tags ? I tested here and it’s working, I’m just confirming the relationship with the link I put in my reply...
– MagicHat
My problem is with the answer that the database gives, because visually it appears with the accent, but internally it appears special characters, when doing the test isolated as I put in the example it sure, as your answer worked, but when I use $Row['text'] the result is another.
– CristianeBaill
So, like I said put the real code you’re using...
– MagicHat
I was able to solve with these functions utf8_encode and utf8_decode
– CristianeBaill