Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chopping extra COMMAS at the end of a STRING

Status
Not open for further replies.

Bipasha

Programmer
Feb 28, 2001
23
US
Dim array(10)
.
.
.
If IsArray(newArray) then
value = JOIN(newArray, ",")
Response.Write value
End If


(Output) value = 14, 15,,,,,,,,,

Is there a way to chop the extra commas at the end of the string??
 
two options
1. redim your array to the number of elements you have and then you'll only have the first 2 entrys.
2. strip your string, mystring = left(mystring,len(mystring)-x)
where x is the number of trailing ,'s [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top