Name
CFLOOP
Synopsis
<CFLOOP>
HTML and CFML
</CFLOOP>
A looping construct that can implement different kinds of looping, depending on the attributes specified.
Attributes
-
CONDITION="
expression
"
Using the
CONDITION
attribute creates awhile
loop that repeats while a specified expression isTrue
. In order to work, the expression being tested must change with each iteration until the condition evaluates toFalse
. Can’t be used with any other attributes.-
COLLECTION="
COM_object_or_CF_structure
"
The
COLLECTION
attribute loops over a COM collection object or a ColdFusion structure. Requires theITEM
attribute and can’t be used with any other attributes.-
ITEM="
collection_or_key
"
The variable name for the collection (COM object) or key (ColdFusion structure) referenced in a
COLLECTION
loop. Required withCOLLECTION
.-
INDEX="
index_name
"
Using the
INDEX
attribute creates afor
loop. This loop either repeats a specified number of times, when used with theFROM
,TO
, andSTEP
attributes; or loops through a list, with theLIST
andDELIMITERS
attributes.INDEX
specifies a variable that can access the current value of the index loop. When used with theFROM
,TO
, andSTEP
attributes, theINDEX
value is set to theFROM
value (required) and incremented by theSTEP
value (optional) for each iteration of the loop until theTO
value (required) is reached. When used with theLIST
(required) andDELIMITERS
(optional) attributes,INDEX
is a place holder for the current list item. Can’t be used ...
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.