If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > vbscript arrays

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-10-04, 12:40
softie() softie() is offline
Registered User
 
Join Date: Sep 2004
Posts: 21
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).

Reply With Quote
  #2 (permalink)  
Old 11-11-04, 09:03
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
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>"
next
%>
Reply With Quote
  #3 (permalink)  
Old 11-16-04, 15:42
softie() softie() is offline
Registered User
 
Join Date: Sep 2004
Posts: 21
thanks for the help

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On