Skip to main content
Participant
April 25, 2006
Answered

Loops in arrays or structures

  • April 25, 2006
  • 2 replies
  • 400 views
Loops in arrays or structures
Loops in arrays or structures

I was given a project on html reports and
They have advised me to use Loops in arrays or structures
At this point I am a novice at this html reporting system. I would like to know how I can use loops in arrays or structures.
How is it beneficial are
1. Structures
2. Arrays
3. loops in for both
for my reports.

Countless thanks in advance
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Dan_Bracuk
At this point it would be a good idea to reveiw the cfloop tag and array functions in the cfml reference manual. If you don't have one, the internet does.

2 replies

Dan_BracukCorrect answer
Inspiring
April 25, 2006
At this point it would be a good idea to reveiw the cfloop tag and array functions in the cfml reference manual. If you don't have one, the internet does.
Participant
April 25, 2006
Structures are great if you understand them, they are basically just arrays organized by keywords rather than index numbers.

Arrays are very nice, as you can just run through loops to access each element, as they are all indexed by numbers 0-x.

loops are great to navigate through both. All you have to do is set an loop to run through x amount of iterations of the array or structure (where x is the length of the array, or number of elements in the structure). Loops are great due to the small amount of code they require.