note 106589 added to function.array-filter
| From: | spam dot 2011 at rebell dot at | Date: | Mon, 21 Nov 2011 10:28:29 +0000 |
| Subject: | note 106589 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184593@lists.php.net to get a copy of this message | ||
If you have not noticed already - array_filter() can be used to remove empty elements, since an
empty string considered "false", if you not specify a callback
Keep in mind, that this will remove also some other values - so if you want a quick "remove
empty elements from array" this function will be fine, as long as you dont have anything to
keep, which casts to "false"
----
Server IP: 69.147.83.197
Probable Submitter: 81.223.129.178
----
Manual Page -- http://www.php.net/manual/en/function.array-filter.php
Edit -- https://master.php.net/note/edit/106589
Del: integrated -- https://master.php.net/note/delete/106589/integrated
Del: useless -- https://master.php.net/note/delete/106589/useless
Del: bad code -- https://master.php.net/note/delete/106589/bad+code
Del: spam -- https://master.php.net/note/delete/106589/spam
Del: non-english -- https://master.php.net/note/delete/106589/non-english
Del: in docs -- https://master.php.net/note/delete/106589/in+docs
Del: other reasons-- https://master.php.net/note/delete/106589
Reject -- https://master.php.net/note/reject/106589
Search -- https://master.php.net/manage/user-notes.php