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 Index Loop

One of the most frequently used loops is the index loop, used to loop a set number of times (from a specified value to another specified value). To learn about this loop, you’ll generate a simple list (see Figure 9.8). Type the code in Listing 9.11, and save it in 9 as loop1.cfm.

Figure 9.8. Loops can build lists and other display elements automatically.
Listing 9.11. loop1.cfm
<!--- Name: loop1.cfm Author: Ben Forta (ben@forta.com) Description: Demonstrate use of <cfloop from to> Created: 07/01/2007 ---> <html> <head> <title>Loop 1</title> </head> <body> <!--- Start list ---> <ul> <!--- loop from 1 to 10 ...

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