<cfset "dynamicName_#i#" = i>

Or

<cfset SetVariable("dynamicName_#i#", i)>

Or

Use an array for dynamicName and use the dynamicName[] notation if i is
a number.

Or

Use a struct for dynamicName and use the dynamicName[] notation if I can
be any string.

If you can do the 3rd option, go for the 3rd option. :)

----------------------------
James Ang
Senior Programmer
MedSeek, Inc.
[EMAIL PROTECTED]



-----Original Message-----
From: Shawn McKee [mailto:[EMAIL PROTECTED]] 
Sent: Friday, June 14, 2002 3:59 PM
To: CF-Talk
Subject: dynamic variable name


My brain is fried.

How do I do this?

        <cfloop from="1" to="10" index="i">
                <cfset dynamicName_#i# = #i#>
        </cfloop>

So that I end up with variables name dynamicName_1 through
dynamicName_10?

Shawn McKee


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to