note 50596 added to function.str-replace
| From: | (anca.zaharia@grapefruit.ro) | Date: | Fri, 04 Mar 2005 10:33:23 +0000 |
| Subject: | note 50596 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85911@lists.php.net to get a copy of this message | ||
Simple function to strip multiple white spaces in a string:
$sample = preg_replace('/\s\s+/', ' ', $sample);
----
Manual Page -- http://www.php.net/manual/en/function.str-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50596
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50596&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50596&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50596&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50596&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50596&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50596&report=yes
Search -- http://master.php.net/manage/user-notes.php