![]() |
|
|
+ Search |
![]()
|
Mar 23rd, 2004 00:13
Jason Benson, Mandy Anderson,
<% DIM txt(5) 'declare the array txt(0) = "potatoes" txt(1) = "apples" txt(2) = "oranges" txt(3) = "bananas" txt(4) = "pears" txt(5) = "peaches" for n = 0 to 5 Response.Write txt(n) & VBCRLF Next %> Will output: potatoes apples oranges bananas pears peaches If you just wanted to write "n" then <% for n = 0 to 5 Response.Write n & VBCRLF Next %> Will output: 0 1 2 4 5 if like in your question you want to make a String Variable = to the value in the above array: <% for n = 0 to 5 StrVar = StrVar & n & VBCRLF Next Response.Write StrVar %> will output 0 1 2 3 4 5 hope that helps jb "It is a mistake to think you can solve any major problems just with potatoes." --Douglas Adams
© 1999-2004 Synop Pty Ltd