matthew...you da man!
thanks!

-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:21 PM
To: CF-Talk
Subject: Re: Vertical Display...


<cfset cols = 4>
<cfset rows = ceiling(listlen(PairSizeList) / cols)>
<cfset data = arraynew(2)>

<cfloop from="1" to="#cols#" index="col">
    <cfloop from="1" to="#rows#" index="row">
        <cfset data[col][row] = listgetat(PairSizeList, (col - 1) * rows +
row)>
    </cfloop>
</cfloop>

<cfoutput>
    <table>
        <cfloop from="1" to="#rows#" index="row">
            <tr>
               <cfloop from="1" to="#cols#" index="col">
                    <td>
                        #data[col][row]#
                    </td>
                </cfloop>
            </tr>
        </cfloop>
    </table>
</cfoutput>

Haven't checked this, and you'd need also to check what happens when
listlen(PairSizeList)  is not a multiple of 4.

Matthew Walker
Electric Sheep Web
http://www.electricsheep.co.nz/



----- Original Message -----
From: "Che Vilnonis" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 9:07 AM
Subject: Vertical Display...


> Last week there was code to display a query's content's 'vertically'. Say
I
> have the folllowing list:
>
> <cfset PairSizeList =
>
"8,8.5,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,42,4
> 4,46,48">
>
> How would I display that list in a table 'vertically' with 4 columns???
>
> TIA-Ch�
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

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

Reply via email to