Re: [PHP] applying one function to all array elements

2003-11-02 Thread Chris Shiflett
--- Justin French <[EMAIL PROTECTED]> wrote: > Can someone show me a simple, clean way to apply one function (eg > stripslashes()) to every element in an array (eg $_POST)? [snip] > I've also seen http://www.php.net/array_walk, but couldn't > determine how/if it suited my needs. Maybe you can ex

Re: [PHP] applying one function to all array elements

2003-11-02 Thread Mike Migurski
>Can someone show me a simple, clean way to apply one function (eg >stripslashes()) to every element in an array (eg $_POST)? > >I've been doing it with a foreach() loop, but there has to be a better >way. I've also seen http://www.php.net/array_walk, but couldn't >determine how/if it suited my ne

[PHP] applying one function to all array elements

2003-11-02 Thread Justin French
Hi, Can someone show me a simple, clean way to apply one function (eg stripslashes()) to every element in an array (eg $_POST)? I've been doing it with a foreach() loop, but there has to be a better way. I've also seen http://www.php.net/array_walk, but couldn't determine how/if it suited my