开发者

str_replace Ð to &

开发者 https://www.devze.com 2023-03-10 19:20 出处:网络
I want to replace the char Ð into &. im trying the following sim开发者_JAVA技巧ple str_replace

I want to replace the char Ð into &.

im trying the following sim开发者_JAVA技巧ple str_replace

str_replace("Ð","&",$string)

but somehow is not working..


str_replace returns its result, it doesn't change its argument.

$string = str_replace("Ð","&",$string);


Maybe is a problem with charsets.. a workaround could be use htmlentities() on the string and replace strings in its output.

0

精彩评论

暂无评论...
验证码 换一张
取 消