Guest User

Untitled

a guest
Jun 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <!--- array notation --->
  2. <cfset scope["staticName"& dynamicPortion] = "some value">
  3.  
  4. <!--- example 1 --->
  5. <cfset variables["baseName"& x] = "oh brother">
  6. <!--- example 2 --->
  7. <cfset variables["baseName#x#"] = "oh brother">
  8.  
  9. <!--- Loop over the girls and alter the values. --->
  10. <cfloop index="intGirl" from="1" to="3">
  11.  
  12. <!--- Randomly pick 1 (true) or 0 (false). --->
  13. <cfif RandRange( 0, 1 )>
  14.  
  15. <!--- Set the dynamic variable naming used quoted evaluation. --->
  16. <cfset "Girl#intGirl#" = "super sexy" />
  17.  
  18. </cfif>
  19.  
  20. </cfloop>
  21.  
  22. <cfoutput query="queryName">
  23. <!--- Setting code in here --->
  24. </cfoutput>
  25.  
  26. <cfloop query="queryName">
  27. <cfset application.varName = queryName.varName />
  28. </cfloop>
Add Comment
Please, Sign In to add comment