OK, so I did this:
<cfloop query="MyQuery">
<cfset variables[IndexNo] = MyVariableName>
</cfloop>
And when I output #variables[IndexNo]#, I get "MyVariableName".
But what I want is to output #MyVariableName#.
Sorry, feeling a bit dense on this one. I know
#Evaluate("#variables[IndexNo]#")# would do the trick, but we're
talking hundreds of them on a page,and that would get a bit heavy.
Chad
who just isn't getting it
On 5/18/05, Mark Mandel <[EMAIL PROTECTED]> wrote:
> Not an array mate - a struct.
>
> So from your previous example:
>
> <cfset IndexNo = 1>
> <cfloop query="MyQuery">
> <cfset variables[MyVa & IndexNo] = MyQuery.columnName>
> </cfloop>
>
> Will work fine
>
> Does that make more sense?
>
> Mark
>
> On 5/18/05, Chad Renando <[EMAIL PROTECTED]> wrote:
> > 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
> >
>
> --
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> ICQ: 3094740
>
> ---
> 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/