evaluate allows you to evaluate dynamic variables. <cfset variable1 = 3> <cfset variable2 = 4>
To get the information in the dynamic variable we use evaluate() <cfoutput>#evaluate('variable#x#')#</cfoutput> will give us 2. Therefore we can build a loop over these items and use evaluate to give us the information <cfloop index="count" from="1" to="2"> <cfoutput>The contents of variable#count# is #evaluate('variable#count#')#<br></cfoutput> </cfloop> Setvariable works at setting dynamic variables (of course you can use CFSET in a special way that I prefer, but lets start with Setvariable() SetVariable <cfloop index="count" from="1" to="2"> <Cfset Temp = setVariable("variable#count#","#count#")> </cfloop> Another way to do the same thing is with <cfset> <cfloop index="count" from="1" to="2"> <Cfset "variable#count#" = count> </cfloop> This will also set dynamic variables. Hope this helps! and good luck on the test! Sandy Clark Shayna Productions www.shayna.com -----Original Message----- From: Fleischer, Beth [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 06, 2001 9:42 AM To: CF-Talk Subject: Need help studying for my stupid test... Can someone explain to me evaluate and setvariable. My brain hurts. Thanks in advance. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com 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