COM CollectionStructure 迴圈

你可以迴圈結構或 COM 集合。

<cfset myBooks = StructNew()>
<cfset myVariable = StructInsert(myBooks,"ColdFusion","ColdFusion MX Bible")>
<cfset myVariable = StructInsert(myBooks,"HTML","HTML Visual QuickStart")>
<cfset myVariable = StructInsert(myBooks,"XML","Inside XML")>
<cfloop collection="#myBooks#" item="subject">
    <cfoutput>
        <b>#subject#:</b> #StructFind(myBooks,subject)#<br />
    </cfoutput>
</cfloop>