Results 1 to 3 of 3

Thread: vbscript arrays

  1. #1
    Join Date
    Sep 2004

    Unanswered: vbscript arrays

    i create an array from the split function. then, i can perform LBound and UBound on this new array. suppose i get 0 and 1 as LBound and UBound values.

    my problem is that i can loop through the array using For Each but i cannot access every element directly using array(0) or array(1).

  2. #2
    Join Date
    May 2004
    If you could, please post some of your code where you are splitting and trying to loop through the array. That would help us to help you.

    As a stab in the dark though...
    txtString = "This,is,my,string"
    myarray = split(txtString, ",")

    for x = lbound(myarray) to ubound(myarray)
    response.write myarray(x) & "<BR>"

  3. #3
    Join Date
    Sep 2004
    thanks for the help

    the problem was actually that the split function seemed to be failing when i had strings with special chars

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts