note 115574 added to function.array-filter
| From: | thinksasa at 163 dot com | Date: | Tue, 19 Aug 2014 02:03:24 +0000 |
| Subject: | note 115574 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200215@lists.php.net to get a copy of this message | ||
Note,please be care of to use it . It is able to filter the element,but you are not better to change
the array element.
example:
<?php
$arr = array(1, 'u'=>2, 't'=>1,5);
function test($var){
return $var+1;
}
echo "<pre>";var_dump(array_filter($arr,'test'));
?>
output:
array(4) {
[0]=>
int(1)
["u"]=>
int(2)
["t"]=>
int(1)
[1]=>
int(5)
}
Now,you can see it that it hasn't been changed.
----
Server IP: 72.52.91.14
Probable Submitter: 119.253.59.30
----
Manual Page -- http://php.net/manual/en/function.array-filter.php
Edit -- https://master.php.net/note/edit/115574
Del: integrated -- https://master.php.net/note/delete/115574/integrated
Del: useless -- https://master.php.net/note/delete/115574/useless
Del: bad code -- https://master.php.net/note/delete/115574/bad+code
Del: spam -- https://master.php.net/note/delete/115574/spam
Del: non-english -- https://master.php.net/note/delete/115574/non-english
Del: in docs -- https://master.php.net/note/delete/115574/in+docs
Del: other reasons-- https://master.php.net/note/delete/115574
Reject -- https://master.php.net/note/reject/115574
Search -- https://master.php.net/manage/user-notes.php