Is there a way to dynamically create a variable


the following code segment throws exception. can define parameter using following code, not work me. need dynamically define x number of local variables. syntax off here, or there way accomplish this? in advance.

<cfloop index = "i" = "1" = "#attributes.x#">
<cfset=var#i#>
</cfloop>

you need use variables scope local variables.

<cfloop index = "i" = "1" = "#attributes.x#">
<cfset variables["var" & i] = something>
</cfloop>


More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support