09-30-2007, 08:47 PM
|
#5 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
To further the last post, above, there is also the array_walk function which behaves similarly (but not the same!) as array_map.
array_walk ( PHP manual page)
This does the same thing as the array_map example above.
PHP Code:
array_walk($MyInputArray, 'htmlspecialchars');
The important difference being that array_walk acts on the array itself, whereas array_map acts on a copy of it (sort of) by default.
|
|
|
|