应该如此:
$text = 'This is the text with 3445';
我希望它是:
$trimmed = 'Thisisthetextwith3445';
答案 0 :(得分:3)
答案 1 :(得分:3)
$trimmed = str_replace(' ', '', $text);
echo $trimmed;
答案 2 :(得分:1)
$ foo = preg_replace('/ \ s + /','',$ foo);
删除一个或多个空格