I have a table that is supposed to look like this
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
//repeat ad nauseum for number of records in 3's
</table>
But it still only displays the records down 1 row....
I have 31 names I need them to go across the screen (3 at a time) then go the next 1 down etc.....
here is the php
<?php
mysql_connect('localhost', 'username', 'password');
mysql_select_db('database');
$res = mysql_query("SELECT * FROM roster ORDER BY Alias");
$rest = mysql_fetch_row($res);
$data = mysql_num_rows($res);
echo $data;
$max_data = 3;
print '<table border=\"1\">';
while($array = mysql_fetch_array($res)){
for ( $y=1; $y<=1; $y+=$data )
{
echo '<tr>';
for ( $x=1; $x<=1; $x+=$max_data )
{
echo '<td>';
echo $array[Alias];
echo '</td>';
}
echo '</tr>';
}
}
echo '</table>';
?>
Thanks for any and all help