Check out dynamic variables. Something like this should do it:
<CFLOOP From="1" To="10" Index="ndx">
<CFSET x = SetVariable("Session.Variable_#ndx#" = Form.FormField>
</CFLOOP>
<CFLOOP From="1" To="10" Index="ndx">
#Evaluate("Session.Variables_#ndx#")#
</CFLOOP>
On Thu, 25 Oct 2001, Herman Cremer wrote:
> 'elo list.
>
> I wonder if anyone can help.
>
> I am trying to set up 10 session variables.
> Like so:
>
> <CFLOOP From="1" To="10" Index="ndx">
> <CFSET Session.Variable_#ndx# = Form.FormField>
> </CFLOOP>
>
>
> And then display them.
> like so:
> <CFLOOP From="1" To="10" Index="ndx">
> #Session.Variable_#ndx##
> </CFLOOP>
>
> This code does not work, but its just to give you an idea of what I am
> trying to do.
> My question...Can one use on variable as part of another ?!?! -if this makes
> sense.-
>
> Another example:
> Is this possible ?
>
> <CFSET x = "var1">
> <CFSET MyVar#var1# = "a value">
>
>
> Any suggestions welcome.
>
> Herman Cremer
> South Africa.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com