I know evaluate is of the devil, so have avoided it, even though I
hypocritically listen to rock and roll backwards when no one is
listening.

Yeah, I remember seeing the CF doc about storing it in an array.  I
can set the variables OK, and have played around with storing the
variable name in an array like it says.  But the variable name itself
is stored in the array.

So I have MyArray[1] = MyVar1, MyArray[2] = MyVar2.

If I output MyArray[1], I get "MyVar1".  

MyVar1 = "Bob" and MyVar2 = "Joe".  How do I output MyVar1 and MyVar2
when the only way I can access them is through the array?

Chad
who is lost  



On 5/18/05, Steve Onnis <[EMAIL PROTECTED]> wrote:
> <cfset IndexNo = 1>
> <cfloop query="MyQuery">
>      <cfset "#MyVar##IndexNo#" = "some value">
> </cfloop>
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Chad
> Renando
> Sent: Wednesday, May 18, 2005 1:14 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Dynamically Named Variables
> 
> What is the syntax please for creating dynamically named variables?
> 
> Say I dynmically created variables called MyVar1, MyVar2, etc..
> 
> I want to do something like:
> 
> <cfset IndexNo = 1>
> <cfloop query="MyQuery">
>      #MyVar##IndexNo#
> </cfloop>
> 
> Cheers,
> 
> Chad
> who looks on cbs.com before watching Survivor to see who gets voted off.
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to