preg_replace過濾多個空格$text = "ooo 我是 空格"; $text = preg_replace("/(\s+)/",' ',$text); echo $text;登入後複製