A sample of what you were trying would have been helpful...
If I understood your problem right, the solution is a piece of code like this:
<?
echo("<table>\n<tr>\n");
while ($myrow=mysql_fetch_row($result))
{
$colcount++;
if ($colcount==$desiredcolcount)
{
$colcount=0;
}
if (!$colcount)
{
echo("</tr>\n<tr>\n");
}
echo("<td>[your output here]</td>\n");
}
if ($colcount)
{
for (;$colcount<$desiredcolcount;$colcount++)
{
echo("<td> </td>\n");
}
}
echo("</tr>\n</table>");
?>
Chris Payne wrote:
> Hi there everyone,
>
> This is probably a really simple problem but for the life of me I can't figure out
>what i'm doing wrong.
>
> My problem is I am getting 20+ results from a DB to display without any problems
>with the images etc ..... but they display one ontop of another (Of course with
>spacing underneath etc ...) The problem however is that when I try to format the
>layout in a table it screws up.
>
> I need the results to display 3 across and however many down as needed, but I can
>only get it to display either one ontop of the other or all of them going across the
>top of the screen which stretches the screen out unacceptably.
>
> Please help me, I need to know how the table code should be to allow me to display 2
>or 3 items across and then down.
>
> Thank you all for your help and Merry Christmas :-)
>
> Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]