demiancurran
Programmer
I need to set a session variable in a loop. Here is what the variable should produce once looped...
In the loop the 1 at the end of the variable needs to be looped, so I need to know how to set the variable. Here is what I have but when dumping the session it is not changing...
Thanks for your helP!
Code:
<cfset session.store[1].a1 = 18>
<cfset session.store[1].a2 = 18>
<cfset session.store[1].a3 = 18>
In the loop the 1 at the end of the variable needs to be looped, so I need to know how to set the variable. Here is what I have but when dumping the session it is not changing...
Code:
<cfloop index="x" from="1" to="3">
<cfset "#evaluate("session.store[1].a"&x)#" = 18>
</cfloop>
Thanks for your helP!