Next and Loop

Drew 0 Tallied Votes 93 Views Share

Learn how to loop anything you want sertain number of times. In this
example im gonna show you a simple next and loop that changes the font
size.

<%
' Define the variables you are going to use
Dim LoopCount

'Start the for next loop
For LoopCount = 1 to 5 

'If you wanted to count from 5 down to 1
'it would look like this...
'For LoopCount = 5 to 1 step -1

'Use the LoopCount value how you desire
'In this case it's used to change the font size
%>

<font size=<%=LoopCount%>>Text</font><br><br>

<%
'Repeat your loop
Next
%>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.