note 17233 deleted from function.array-filter by jimw

From: Date: Tue, 18 Dec 2001 20:18:12 +0000
Subject: note 17233 deleted from function.array-filter by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23196@lists.php.net to get a copy of this message
<p>If you want to filter an array depending on a run time generated value which varies time to time, consider the following idea:</p> //just a very simple example array_filter($array, create_function('$element, $default='.$value, 'return $element == $default;')); <p>With create_function one can easily define a new function with different default arguments used in function body. <br>With these arguments one can access variables from other scope beside "global".</p>

« previous php.notes (#23196) next »