Increment by 1, starting at 2

I need to increment numbers starting at 2 and increasing by one after each loop,

So

2
3
4
5
6
jeffmaceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SidFishesCommented:
are you looping over a query?

<cfset vInt = 2>

<cfloop name ="looper" datasource="mydata">
#vInt#
<Cfset vInt = vInt+1>
</cfloop>
0
SidFishesCommented:
oops... too early


<cfquery name="looper" datasource="mydata">
select * from mytable
</cfquery>
<cfset vInt = 2>
<cfloop query ="looper">
#vInt#
<Cfset vInt = vInt+1>
</cfloop>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mkishlineCommented:
We can give you a better answer if we know the context for your looping.

<cfset lastnumber = 10 />
<cfoutput>
  <cfloop index="i" from="2" to="#lastnumber#">
    #i#<br />
  </cfloop>
0
jeffmaceAuthor Commented:
Nope, that did the trick.. Perfect.. Thank you both
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.