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

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

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