0

I would like to output two numbers consecutively:

- Number one

- Number two

Below is the basic code:

  <cfloop index="x"  from="2" to="#ListLen(stringOf200Numbers)#" >
          <cfset x2 = x>
          <cfoutput>
             <h2>#x#</h2>
             <h2>#x2#</h2>
             </br>
         </cfoutput>
  </cfloop>

I have tried many different angles.. would love some expert assistance...

1
  • 3
    Please don't simply say "you've tried many different angles", please show us the different angles so we know what ground you've already covered. Commented Oct 21, 2013 at 7:28

1 Answer 1

5

Well the next index in the loop is going to be... x+1, isn't it? So the first entry in stringOf200Numbers is going to be listGetAt(stringOf200Numbers, x), and the second one is going to be listGetAt(stringOf200Numbers, x+1). Be careful at the end of the loop though... there will not be an x+1 entry for the last list position.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.