I have some text as below:
$cnt = "header text�
first line
�
The second line
�
other line
�"
can I remove all special text like �
in my string?
i used $cnt = str_replace("�", "", $cnt);
but nothing change.
can you help me?
I have some text as below:
$cnt = "header text�
first line
�
The second line
�
other line
�"
can I remove all special text like �
in my string?
i used $cnt = str_replace("�", "", $cnt);
but nothing change.
can you help me?
What's your target character encoding? You may want to strip all non UTF-8 characters from your string. See here:
Try this out
$str = str_replace("\xEF\xBB\xBF",'',$str);
It removes utf-8 bom (byte-order mark) characters.