RE: [PHP] changing array to a string

From: Date: Wed, 28 Mar 2007 05:18:51 +0000
Subject: RE: [PHP] changing array to a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-251508@lists.php.net to get a copy of this message
Richard Kurth wrote: > When I submit the for below it gives me an array that looks like this > "array(5) { [0]=> string(1) "3" [1]=> string(1) "4" [2]=> > string(1) "5" > [3]=> string(1) "6" [4]=> string(1) "7" } " > I would like to convert it to a string like this "3,4,5,6,7" $ids = implode(',', $_POST['subscriptions']); Thanks I keep trying explode and forgot about implode

« previous php.general (#251508) next »