Re: [PHP] something like array_walk?

2002-11-15 Thread Marek Kilimajer
What about foreach($color as $c) { $color_soundex[]=soundex($c); } A. J. McLean wrote: I want to take an array and get the soundex() for each element in that array and return the results into another array. Is there an clean way to do this? $color = array(blue, green, orange, purple, red,

RE: [PHP] something like array_walk?

2002-11-15 Thread Jon Haworth
Hi, I want to take an array and get the soundex() for each element in that array and return the results into another array. How about: $color = array(blue, green, orange, purple, red, yellow); $soundex = array(); foreach ($color as $foo) { $soundex[] = soundex($foo) } HTH Cheers Jon

Re: [PHP] something like array_walk?

2002-11-15 Thread A. J. McLean
Thanks! Just what I was looking for! Jon Haworth [EMAIL PROTECTED] wrote in message news:67DF9B67CEFAD4119E4200D0B720FA3F0241E788;BOOTROS... Hi, I want to take an array and get the soundex() for each element in that array and return the results into another array. How about: $color =

Re: [PHP] something like array_walk?

2002-11-15 Thread Khalid El-Kary
hi, just remove the from the first argument of array_walk, the function then operates on a copy of the array. this is written in the PHP manual, check there khalid _ Add photos to your messages with MSN 8. Get 2 months FREE*.