I'm using a WHILE loop to generate a list of addresses/phone numbers. I want to format the output into a table for output to a printer on labels.
I can create the while loop to make a small table, but essentially I want three cells across, and ten down like regular address labels. I need to be able to use the WHILE to pull each record, put it in a cell, and go to the next record, etc.
But, it needs to wrap to the next table row once it hits three. I can't seem to find a way to do it without totally screwing up my WHILE loop.
Any ideas?
Desired output:
<table>
<tr><td>Company 1<td>Company 2<td>Company 3</TR>
<TR><TD>Contact<TD>Contact<TD>Contact</TR>
<TR><TD>123 Anystreet<TD>456 Anystreet<TD>789 12th</TR>
<TR><TD>Yourtown, USA<TD>Hertown, USA<TD>Histown, USA</TR>
<TR></TR>
<TR><TD>Company 4<TD>Company 5<TD>Company 6</TR>
</table>
etc.