Hi, On Fri, Jun 07, 2002 at 10:49:21AM +0200, C. McCohy wrote : > <? > $fruits = array('banana', 'orange', 'apple'); > $vegetables = array('carrot', 'cabbage', 'cucumber'); > $favorite_food = 'icecream'; > > $all_day_food = implode_multi(', ', $fruits, $vegetables, $favorite_food); > // ... = "banana, orange, apple, carrot, cabbage, cucumber, icecream" > ?>
Do we really need a new function just to save a few keystrokes? Using array_merge() can you achive the same thing: <? $fruits = array('banana', 'orange', 'apple'); $vegetables = array('carrot', 'cabbage', 'cucumber'); favourite_food = 'icecream'; $foo = implode(', ', array_merge($fruits, $vegetables, array($favourite_food))); var_dump($foo); ?> $ php test2.php string(58) "banana, orange, apple, carrot, cabbage, cucumber, icecream" - Markus -- GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php