note 955 deleted from array_walk by ronabop
| From: | ronabop@php.net | Date: | Sun, 10 Dec 2000 04:29:41 +0000 |
| Subject: | note 955 deleted from array_walk by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8577@lists.php.net to get a copy of this message | ||
BIG OMISSION HERE!
It would be *extremely* valuable to be able to hand in another argument (or any number) to the
function processing the elements of the array.
e.g.:
<pre>
function bug_smasher($element, $squish_me) {
if ($element == $sqish_me)
$element = "splat";
}
$ar = array("ant", "gerbil", "giraffe");
array_walk($ar, "bug_remover", "ant");
</pre>