php 去掉字符串中的连续空白

$return = preg_replace('#\s+#', ' ',trim($return));

posted @ 2012-12-20 18:00  简单--生活  阅读(1849)  评论(0编辑  收藏  举报
简单--生活(CSDN)