hi All.
I have an application that creates an array based on a few variables.
The application enters the contents of the array into a DB by looping over the
array.
My issue is that I need the array name in the loop to be dynamic based on
another var I have set. EX: <cfset moduleGroup = "1A">
Here is how it goes:
The arrays are set into session:
<cfset session.ceuAppModules1A = [] />
<cfloop query="course1Apply" startrow="1" endrow="6">
<cfset arrayAppend(
session.ceuAppModules1A,
"#INTMODULEID#"
) />
</cfloop>
The 1A part of the array name is what can change. It can be 1B, 4A, etc.
What I would like to do is when I enter the contents of the array into the DB,
I'd like the name of the array loop to be dynamic:
Here is my loop:
<cfloop array="#session.ceuAppModules1A#" index="i">
I want the "1A" part of the array name to be dynamic but I have spent too much
time trying to come up with the correct syntax.
Any suggestions?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351820
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm