just did this quick and dirty, may be parse errors, and i know it could be cleaner, but here ya go anyway
<table border="0" width="400">
<tr>
<?
$i = 1;
$dir = opendir($current_dir);
while (readdir($dir))
{
$j = $i % 3;
if ($j == 0)
{
?>
<td width="250" align="center" valign="top">
<?
echo $file;
}
?>
</td></td>
</tr><tr>
<?
}
else{
?>
<td width="250" align="center" valign="top">
<?
echo $file;
?>
</td>
<?
}
$i++;
}
closedir($dir);
?>
</table>