Skip to main content
Known Participant
June 22, 2006
Question

Display Quesiton in 4 Columns

  • June 22, 2006
  • 1 reply
  • 185 views
Hey all-

I have a structure as the following:

<cfset student.firstname="tom">
<cfset student.lastname="john">
<cfset student2.firstname="sam">
<cfset student2.lastname="smith">
<etc...>

I have 12 records in this structure. How do I display this as 4 columns and three rows?

Thanks for any help,
Regards,
ISM

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 22, 2006
    I don't think I fully understand your question? So you have 12 students ... I am confused about how you want the info organized.

    What do you want in the columns? ... obviously you want the students in the cells, but you only want four students per row?

    If this is the case

    <cfoutput>
    <table>
    <tr>
    <td>#student.firstname# #student.lastname#</td>
    <td>#student2.firstname# #student2.lastname#</td>
    <td>#student3.firstname# #student3.lastname#</td>
    <td>#student4.firstname# #student4.lastname#</td>
    </tr>
    <!---continue this same structure with the rest of the students--->
    </table>
    </cfoutput>