删除多个空格
2022-08-30 06:12:59
我从MySQL数据库获取,我需要删除所有空格,等等。$row['message']
\n
\t
$row['message'] = "This is a Text \n and so on \t Text text.";
应格式化为:
$row['message'] = 'This is a Text and so on Text text.';
我试过了:
$ro = preg_replace('/\s\s+/', ' ',$row['message']);
echo $ro;
但它不会删除 或 ,只是单个空格。谁能告诉我怎么做?\n
\t