Try something like this:
String createview = null
for (int i = 0; i < tables.length; i++) {
createview= createview + tables[i];
if ( i != tables.length - 1 )
createview = createview + ", ";
}
Hope I understood your problem right!
Azam Ali Mohammed
John Deere Dubuque Works
> -----Original Message-----
> From: Sam Rose [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 06, 1999 10:17 AM
> To: [EMAIL PROTECTED]
> Subject: help with getParameterValues()
>
> Hello,
>
> I was wondering if anyone could help me,
>
> I have on one page a select box which the user can choose multiple
> options and then submit this to the next servlet.
>
> This then retrieves the values by this
>
> String tables[]=req.getParameterValues("selectbox name");
>
> My problem is, is that I need to convert these into a string like
> so...
> Option 1, option 2, and option 3
> With the last option not having a comma at the end of it.
>
> I have tried this to get the options
> String createview = null
> for (int i = 0; i < tables.length; i++) {
> createview= createview + tables[i];
> }
>
> Problem is I need a comma to divide the options up but I have no Idea
> how to do that, as well as making sure there isn't a comma at the end
> of the last value.
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html