I'm kind of a newbie here, but I wanted to post in this forum to be more specific of MySQL.
MY BASIC SQL LOOP:
<?
$i=0;
while ($i < $num) {
$var1=mysql_result($result,$i,"var1");
$var2=mysql_result($result,$i,"var2");
?>
Here's my problem.
I want to create a loop that displays these variables in a table.
<td><? echo $var1; ?><br /><? echo $var2; ?></td>
However, after three TDs, I want to end the TR and move on to the next line, e.g.
<tr><td>content</td><td>content</td><td>content</td></tr><tr><td>
etc.
I tried to Google this, but, as is expected, I got MySQL tables, which I know how to use them.
Excuse me for my clarification, it's hard to explain.
Help as soon as possible is appreciated, because I am working on this as a project my friends are relying on (an image gallery).