note 81501 deleted from function.trim by felipe
| From: | felipe@php.net | Date: | Wed, 06 Aug 2008 22:06:18 +0000 |
| Subject: | note 81501 deleted from function.trim by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143248@lists.php.net to get a copy of this message | ||
Note Submitter: gurunars at gmail dot com
----
I implemented the trimAll() function this way:
function trimAll($input)
{
$input = trim($input);
$output = ereg_replace( ' +', ' ', $input );
return $output;
}
Quite easy to use instead of usual trim()