Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- array notation --->
- <cfset scope["staticName"& dynamicPortion] = "some value">
- <!--- example 1 --->
- <cfset variables["baseName"& x] = "oh brother">
- <!--- example 2 --->
- <cfset variables["baseName#x#"] = "oh brother">
- <!--- Loop over the girls and alter the values. --->
- <cfloop index="intGirl" from="1" to="3">
- <!--- Randomly pick 1 (true) or 0 (false). --->
- <cfif RandRange( 0, 1 )>
- <!--- Set the dynamic variable naming used quoted evaluation. --->
- <cfset "Girl#intGirl#" = "super sexy" />
- </cfif>
- </cfloop>
- <cfoutput query="queryName">
- <!--- Setting code in here --->
- </cfoutput>
- <cfloop query="queryName">
- <cfset application.varName = queryName.varName />
- </cfloop>
Add Comment
Please, Sign In to add comment