Skip to main content
May 22, 2008
Answered

Dynamic Variable Names

  • May 22, 2008
  • 2 replies
  • 402 views
Okay, I just need to figure out how to make dynamic variable names. In this case, I have a loop, and inside the loop I need to create a new array for every iteration of the loop. Something like

<cfloop from="0" to="10" index="i">
<cfset LoopArray#i# = Some Value>
</cfloop>

But that doesn't work. How can you make dynamic variable named? I think it's probably something to do with evaluate or DE, but I don't know how to use them, and the livedocs make no sense to me. Thanks!
This topic has been closed for replies.
Correct answer JR__Bob__Dobbs-qSBHQ2
See attached sample.

2 replies

JR__Bob__Dobbs-qSBHQ2Correct answer
Inspiring
May 22, 2008
See attached sample.
May 22, 2008
Thank you both for your replied, I did manage to find a solution (the same one posted by JR "Bob" Dobbs). Pretty much just looks like...
Inspiring
May 22, 2008
Maybe you are just forgetting your cfoutput tag.