On Wed, 02 Feb 2005 22:36:10 -0500, Jeffrey Silverman
<> wrote:
>On Wed, 02 Feb 2005 21:44:00 -0500, Marc wrote:
>
>> I want to have one varchar or text field hold the value of several
>> checkbox items as one string. For example, let's say I have 10 movies
>> and want to list them in a string for the person to state their top 3.
>> So if they check boxes 3, 5, and 8 the result will be 3 to start with
>> 5 appended and 8 appended appearing as "3, 5, 8" in the text box.
>
>
>Rename text boxes like so:
>
><input type="checkbox" name="movies[]" value="1">movie1
>
>etc...
>
>USe the PHP join() function liek so:
>
>$string = join("," $movies);
>
>Voila!
Thanks so much. It was a beast figuring out where to put it.
Evidently, I think you have a typo in the syntax which should be
$string = join(",", $movies);
Which has the extra comma as join(1,2) passes two variables.

Worked great....