note 34124 deleted from function.trim by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 12:20:47 +0000 |
| Subject: | note 34124 deleted from function.trim by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189631@lists.php.net to get a copy of this message | ||
Note Submitter: mrizzo at advancedsl dot com dot ar
----
About trim all elements in an array.
array_filter($db, 'trim') doesn't work becouse it does NOT modify array's
elements, it only returns a copy from those elements which return true on the callback function.
I think that:
foreach ($db as $key=>$value) { $db[$key]=trim($value); }
still being the best option.