note 102455 deleted from function.array-walk by danbrown
[email protected] Wed, 16 Feb 2011 05:56:04 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: http://alex.moutonking.com/wordpress
----
For completeness one has to mention the possibility of using this function with PHP 5.3 closures:
$names = array("D\'Artagnan", "Aramis", "Portos");
array_walk($names, function(&$n) {
$n = stripslashes($n);
};
The trap with array_walk being it doesn't return the array, instead it's modified by reference.