<CFSET VariableName="name_of_variable">
<CFSET VariableValue="the value of the variable">

<CFSET "#VariableName#"=VariableValue>

<CFOUTPUT>
#name_of_variable#
</CFOUTPUT>


Bert

> -----Original Message-----
> From: Doug Nottage [mailto:[EMAIL PROTECTED]]
> Sent: 28 June 2000 04:21
> To: '[EMAIL PROTECTED]'
> Subject: Executing a String?
> 
> 
> 
> How can I assemble an CFML command inside a string and execute it?
> 
> For example, If I had the following CFML code, what would be 
> the next line
> to actually cause the variable "somevalue" to be created and 
> assigned a
> value of 3?
> 
> <cfset myString = "<CFSET somevalue=3>">
> 
> I have a table with two columns called "variableName" and 
> "variableValue".
> I'd like to loop through the set and make sure all the 
> variables get their
> assigned values.
> 
> I could have sworn I made this happen before, but I just can't seem to
> remember how.  I've tried the #evaluate()# function, but you can't do
> something like <CFSET #evaluate("variableName")# =
> #evaluate("variableValue")#> because the left side of an 
> equation can't be a
> function, according to the CF rules.
> 
> Any ideas???
> 
> --Doug
> --------------------------------------------------------------
> ----------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
s/cf_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to