O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Looping

Loops are another fundamental language element supported by most development platforms. Loops do just that—they loop. Loops provide a mechanism with which to repeat tasks, and ColdFusion supports several types of loops, all via the <cfloop> tag:

  • Index loops, used to repeat a set number of times

  • Conditional loops, used to repeat until a specified condition becomes FALSE

  • Query loops, used to iterate through database query results

  • List loops, used to iterate through a specified list

  • Collection loops, used to loop through structures

  • File loops, used to loop through the lines in a file

You won’t use all these loop types here, but to acquaint you with <cfloop>, let’s look at a few examples.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required