How to loop a list ??

# Thread: How to loop a list ??

1. Patrice Guest

## How to loop a list ??

How do I loop a list like this : mylist = "1,6,7,5,3,88,9,22"<BR><BR>thanks

2. Senior Member
Join Date
Dec 1969
Posts
1,944

## RE: How to loop a list ??

mylist = "1,6,7,5,3,88,9,22"<BR>mylist=split(mylist,",")<BR ><BR>for i=0 to ubound(mylist)<BR>response.write mylist(i)<BR>next<BR><BR>

3. Patrice Guest

## RE: How to loop a list ??

thanks !! it work<BR><BR>How do I count how many numbers do I have ??

4. Senior Member
Join Date
Dec 1969
Posts
1,944

## RE: How to loop a list ??

put a counter in between for and next<BR>like<BR>cnt=cnt+1<BR>and print it out after the next.<BR>

5. Patrice Guest

## RE: How to loop a list ??

ok, I know what you mean...thanks for all the help !!

6. MJC
Junior Member
Join Date
Dec 1969
Posts
16

## RE: How to loop a list ??

Wouldn&#039;t it be better to go??<BR>cnt = ubound(mylist)

#### Posting Permissions

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