I need to dynamically extract all the select option choices for each question in a form. The number of choices for each question vary. I have a multi-dimensional array that stores the questsions and choices for each test like the array shown below:
How can I create one piece of code that can take variables and loop through the array to display the choices for one, specific question? How would I write the cfloop? I can't figure out where I'd get number of choices per question from the array. I know I don't want ArrayLen. I do want the length of a set of items though, for example: all the choices for [1][2]{[x] where x = the index grabbing each actual choice in that particular question. I'd appreciate any leads on this question. Thanks. JRose <cfscript> QstnKey = ArrayNew(3); QstnKey[1][1][1] = "TEst1"; QstnKey[1][2][1]="a. choice 1"; QstnKey[1][2][2]="b. choice 2"; QstnKey[1][2][3]="c. choice 3"; QstnKey[1][3[1]="a. choice 1"; QstnKey[1][3[2]="b. choice 2"; QstnKey[1][3[3]="c. choice 3"; QstnKey[2][1][1]="Test2"; QstnKey[2][2][1]="a. choice 1"; QstnKey[2][2][2]="b. choice 2"; QstnKey[2][2][3]="c. choice 3"; QstnKey[2][3][1]="a. choice 1"; QstnKey[2][3][2]="b. choice 2"; </cfscript> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186323 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54