note 54880 deleted from function.array-walk by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:53:27 +0000 |
| Subject: | note 54880 deleted from function.array-walk by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197200@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster at tmproductionz dot com
----
to the note right before this one. that will only trim leading and trailing white space. if you
want to trim white space inside the string (ie 'hello world' to 'hello
world') you should use this:
$val = preg_replace ( "/\s\s+/" , " " , $val ) ;
this will also trim leading and trailing white space.