you can use the implode() function: for ($z=0;$z<count($graphicFormat);$z++) { $graphicFormat = stripslashes($graphicFormat[$z]); }
echo implode(", ", $graphicFormat); "Verdon Vaillancourt" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi All :) > > I have a form that is being passed to a mail function when submitted. It is > working OK, except that I am having trouble with values from arrays such as > checkbox lists. For example, I have a list such as: > > <input type="checkbox" name="graphicFormat[]" value="eps" /> .eps > <input type="checkbox" name="graphicFormat[]" value="jpg" /> .jpg > <input type="checkbox" name="graphicFormat[]" value="tif" /> .tif > <input type="checkbox" name="graphicFormat[]" value="gif" /> .gif > <input type="checkbox" name="graphicFormat[]" value="png" /> .png > <input type="checkbox" name="graphicFormat[]" value="psd" /> .psd > <input type="checkbox" name="graphicFormat[]" value="bmp" /> .bmp > <input type="checkbox" name="graphicFormat[]" value="other" /> other > > I am using something like: > > for ($z=0;$z<count($graphicFormat);$z++) { > $graphicFormat = stripslashes($graphicFormat[$z]); > } > > Which will return a count of the number of items in the array. What I want > returned is a string of the values selected such as: > > "eps, gif, other" > > Any suggestions? > > Best Regards, > verdon > > Ps. Please cc me as I am on digest mode > Pps. Please excuse if my question is TOO fundamental > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php