[英]Replace special character from a string in php
I have a string link this : 我有一个字符串链接:
"Special Word ±"
“特殊词±”
I want to replace the char ±
with +-
. 我想用
+-
代替char ±
。 I use str_replace('±','+-',"Special Word ±")
but the result still shows: 我使用
str_replace('±','+-',"Special Word ±")
但结果仍然显示:
"Special Word ±"
“特殊词±”
This might be a problem with PHP script file encoding. 这可能是PHP脚本文件编码的问题。 Try to convert your script encoding to for example "UTF8"
尝试将脚本编码转换为例如“ UTF8”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.