View Single Post
  #3 (permalink)  
Old May 18th, 2005, 12:12 PM
mmcdonal mmcdonal is offline
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

Make a vbscript out of this code and it should demonstrate getting your array packed into one variable formatted with a comma and space between each element.

'======================
Dim NewArray(2)
Dim strNewString
Dim i

NewArray(0) = "Test0"
NewArray(1) = "Test1"
NewArray(2) = "Test2"

strNewString = NewArray(0)
i = 1
Do Until i = UBound(NewArray) + 1
    strNewString = strNewString & ", " & NewArray(i)
    i = i + 1
Loop
WScript.Echo strNewString
'========================

Output is:

"Test0, Test1, Test2"

mmcdonal
Reply With Quote