Actually, you may not have to do all that.
you can use implode().
By default, implode will join an array, with the supplied character.
So, if you have
$list = (one two three four);
you can do
$all = implode("," , $list);
to get
$all = "one,two,three,four";
This works pretty well...
enjoy!
__________John Monfort_________________
_+-----------------------------------+_
P E P I E D E S I G N S
www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___________________________________+-
On Wed, 21 Feb 2001, Jason Stechschulte wrote:
> On Wed, Feb 21, 2001 at 01:34:10PM -0500, Mike wrote:
> > $keys = array_keys($HTTP_POST_VARS);
> > for($x = 2; $x < count($keys); $x++)
> > {
> > $updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."',";
>
> }
> $updateString = ereg_replace(",$", "", $updateString);
>
> That should take care of the trailing comma.
>
>
> --
> Jason Stechschulte
> [EMAIL PROTECTED]
> --
> One of the reasons Perl is faster than certain other unnamed interpreted
> languages is that it binds variable names to a particular package (or
> scope) at compile time rather than at run time.
> -- Larry Wall in <[EMAIL PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]