House of Fusion
Home of the ColdFusion Community
Search over 2,500 ColdFusion resources here  >>>      

CFSCRIPT: For In Loop

11 For In Loop (Loop)
11.1 A For In loop will loop over a structure. It will NOT loop over the complex data set returned from a COM object.
11.2 The For In loop will set a variable with the 'key' used in each record in a structure. This key variable can then be used to access the value in the structure.
<CFSCRIPT>
     For (key in Session)
          WriteOutput(Session[key]&' ')
</CFSCRIPT>


User Contributed Notes


Add a Note


CFScript