> Is there an easier way to do this...I can't help thinking 
> that there must be??
> 
> <CFSET begin = 1>
> <CFSET end = ArrayLen(session.items)>
> <CFSET arrayelement1 = 1>
> <CFSET arrayelement2 = 1>
> 
> <CFLOOP INDEX="loop_count"
>   FROM="#begin#"
>   TO="#begin#"
>   >
> <CFSET arrayelement2 = 1>
> <CFOUTPUT>
> #session.items[arrayelement1][arrayelement2]#<br>
> <CFSET arrayelement2 = arrayelement2 + 1>
> #session.items[arrayelement1][arrayelement2]#<br>
> <CFSET arrayelement2 = arrayelement2 + 1>
> #session.items[arrayelement1][arrayelement2]#<br>
> <CFSET arrayelement1 = arrayelement1 + 1>
> </CFOUTPUT>
> </CFLOOP>

I'm not exactly sure what you're trying to do here. If you're looping over a
two-dimensional array, you can do it like this:

<cfloop index="i" from="1" to="#arraylen(session.items)#">
        <cfloop index="j" from="1" to="#arraylen(session.items[i])#">
                <cfoutput>#session.items[i][j]#</cfoutput><br>
        </cfloop>
</cfloop>

Note that this isn't equivalent to what you're doing, I don't think.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to