note 59296 added to function.array-filter
| From: | ivo at dom dot de | Date: | Fri, 02 Dec 2005 11:02:01 +0000 |
| Subject: | note 59296 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99443@lists.php.net to get a copy of this message | ||
if you want to filter by keys, use:
array_flip(array_filter(array_flip($arr),"yourfilter"));
but beware of duplicate values, wich will mess things up.
maybe there is an easier/faster/better (or a more 'stylish') way to do?
----
Manual Page -- http://www.php.net/manual/en/function.array-filter.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59296
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59296&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59296&report=yes
Search -- http://master.php.net/manage/user-notes.php