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

The List Loop

List loops are designed to make working with ColdFusion lists simple and error-free. Whether it is lists created by form submissions, manual lists, lists derived from database queries (regardless of the origin), any list (with any delimiter) can be iterated over using <cfloop>.

For an introduction to lists, see Chapter 8.

The following example uses a list created in Chapter 8 and loops through the list displaying one element at a time (see Figure 9.9). Save Listing 9.12 as loop2.cfm.

Figure 9.9. Any lists, with any delimiter, can be iterated using <cfloop>.
Listing 9.12. loop2.cfm
<!--- Name: loop2.cfm Author: ...

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