preg_replace过滤多个空格$text = "ooo 我是 空格"; $text = preg_replace("/(\s+)/",' ',$text); echo $text;登录后复制