note 115574 deleted from function.array-filter by salathe

From: Date: Fri, 22 Aug 2014 08:16:44 +0000
Subject: note 115574 deleted from function.array-filter by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-200280@lists.php.net to get a copy of this message
Note Submitter: thinksasa at 163 dot com ---- 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.

« previous php.notes (#200280) next »