note 89671 added to function.array-filter
| From: | nat at fishtrap dot co dot uk | Date: | Wed, 18 Mar 2009 17:28:20 +0000 |
| Subject: | note 89671 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152104@lists.php.net to get a copy of this message | ||
One of the nice things about this function is that you can a standard php function such as is_string
e.g.
<?php
$input =array(1 , '2', 'three', array('sausages'));
$result = array_filter($input ,'is_string');
print_r($result);
?>
Result will be
Array
(
[1] => 2
[2] => three
)
----
Server IP: 92.48.74.199
Probable Submitter: 194.221.212.165
----
Manual Page -- http://www.php.net/manual/en/function.array-filter.php
Edit -- https://master.php.net/note/edit/89671
Del: integrated -- https://master.php.net/note/delete/89671/integrated
Del: useless -- https://master.php.net/note/delete/89671/useless
Del: bad code -- https://master.php.net/note/delete/89671/bad+code
Del: spam -- https://master.php.net/note/delete/89671/spam
Del: non-english -- https://master.php.net/note/delete/89671/non-english
Del: in docs -- https://master.php.net/note/delete/89671/in+docs
Del: other reasons-- https://master.php.net/note/delete/89671
Reject -- https://master.php.net/note/reject/89671
Search -- https://master.php.net/manage/user-notes.php