问题:
Possible Duplicate: 可能重复:
To strip whitespaces inside a variable in PHP 在PHP中去除变量内的空格
How can I strip / remove all spaces of a string in PHP? 我怎么能剥夺 / 删除 PHP 字符串的所有空间 ?
I have a string like $string = "this is my string";
我有一个字符串,如$string = "this is my string";
The output should be "thisismystring"
输出应该是"thisismystring"
How can I do that? 我怎样才能做到这一点?
解决方案:
参考一: https://stackoom.com/question/8qjN/如何在PHP中删除字符串中的所有空格-重复参考二: https://oldbug.net/q/8qjN/How-do-I-strip-all-spaces-out-of-a-string-in-PHP-duplicate
来源:oschina
链接:https://my.oschina.net/u/4438370/blog/4277705