...

View Full Version : Need Help with printing multiple rows



ptmuldoon
01-24-2007, 07:21 PM
I'm trying to print a table that has between 2 - 8 columns (ie, <td> 's) in it.

If the row has 4 columns I want it to do nothing. But if it has 5 or 6 columns, I want it to break into two rows of 3 and 2 (or 3 and 3), and if it has 7 or 8 columns, it should break it into rows of 4 and 3 (or 4 and 4).

I have the following code here to determine how many columns I have:
if (($numplayers == 5) || ($numplayers == 6))
{ $break = 3; }
else if (($numplayers == 7) || ($numplayers == 8))
{ $break = 4; }
else
{ $break = -1; }

But I'm not sure how to proceed and insert the break into the ending </tr> of a column and to so start a new row.

Or is there a better approach?

Can anyone help with that?

ptmuldoon
02-05-2007, 10:07 PM
small bump, as I'm back to looking to get this implementd.

Can anyone help?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum