PHp + space in linux
In my below code I am replacing .
with a non-breaking space using
$orginal_startString = str_replace('.',' ',$startString);
This works fine in windows and save in databas开发者_运维知识库e but in linux it's not woking properl it's replacing .
with special character Â
.
If you want space as text not HTML, Use the hex equivalent 0x20.
$orginal_startString = str_replace('.',chr(0x20),$startString);
And check this HTML encoding issues - "Â" character showing up instead of " "
精彩评论