Doh!

Thanks

-----Original Message-----
From: James Ang [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 6:04 PM
To: CF-Talk
Subject: RE: dynamic variable name


<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



______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to