note 10109 added to trim
| From: | cgi at harrison dot org | Date: | Thu, 14 Dec 2000 01:02:52 +0000 |
| Subject: | note 10109 added to trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8715@lists.php.net to get a copy of this message | ||
To replace all excess white spaces with a single space try:
print $pizza = "One Two Three Four";
$pizza = eregi_replace("[[:space:]]+", " ", $pizza);
http://www.php.net/manual/function.trim.php