Better way?  You could change the variable to be a bit more readable, or 
try using a structure inside to better explain what you're doing.  
Something like:

<cfloop index="x" from="1" to="ArrayLen(arFAQ)">
    <cfoutput>#arFAQ[x].Question# - #arFAQ[x].Answer#</cfoutput><br/>
</cfloop>

That's not as ugly, IMO, but based on what you have below, it doesn't 
get a whole lot prettier :)  Just be sure to document what you're doing...

- Jim

Les Mizzell wrote:

>OK,  
>
>The below is ugly, but it works:
>
><cfloop index="x" from="1" to="#ArrayLen(QSNDSC_array)#">
>  <cfoutput>#QSNDSC_array[x][1]# #QSNDSC_array[x][2]#</cfoutput>
></cfloop>
>
>Is there a better way tht anybody knows of?
>
>
>:: #arrayName[1,1]# #arrayName[1,2]#
>:: maybe?
>
>
>:: So, how do I output all values in the following (assume it's a question
>:: [1] /answer [2] pair):
>:: 
>:: #QSNDSC[1][2]#
>:: 
>:: Output like (for all questions and answers)
>:: 
>:: question 1 - answer 1
>:: question 2 - answer 2
>:: question 3 - answer 3
>
>                               
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to