I have a shopping cart array of structs running and im trying to dynamically get the data to the screen.
<cfoutput>
<cfloop from="1" to="#ArrayLen(session.shoppingcart)#" index="idx">
<cfloop collection="#session.shoppingcart[idx]#" item="key">
<cfset mydata = session.shoppingcart[idx][key] >
#key# #mydata# #session.shoppingcart[idx][key]#
</cfloop>
</cfloop>
</cfoutput>
When I set the mydata variable, i am able to simply apply #mydata# to the page and it displays.
When i try to apply #session.shoppingcart[idx][key]# to the page i get an error stating that it cannot display this as a simple value.
Any ideas on how to get this information to display on screen ?
thanks in advance
#mydata#, then it renders fine, but if you output just#session.shoppingcart[idx][key]#then you get an error? Can you add the exact error message (ie: copy and paste it from the screen) to your question. Yuo are also not telling us something or not including all the code because - from your code -mydataandsession.shoppingcart[idx][key]have exactly the same values. So will - accordingly - render the same. What have you not told us / not included?