problem in showing 3 images in a row
<p>hey guys , i know this is a stupid question  but i hanged in solving it </p>

<p>i wrote a block of php code to show images from mysql </p>

<pre><code>    echo "&lt;table&gt;&lt;tr&gt; ";

    while($cat = $db-&gt;sql_fetchrow($catinfo)) {
        echo '
        &lt;td&gt;
        &lt;ul id="three-col" class="press"&gt;   
        &lt;li&gt;
    &lt;div class="post-content"&gt;
    &lt;a class="zoom1" href="'.$galsettings[setImgDir].'/'.$cat[galCatLocation].'/'.$cat[galCatImg].'"&gt;
    &lt;img src="'.$galsettings[setImgDir].'/'.$cat[galCatLocation].'/'.$cat[galCatImg].'" alt="artistry (via powerbooktrance)" /&gt;
    &lt;/a&gt;
    &lt;/div&gt;';

    for ($i=0; $i&gt;2; $i++) {
    echo "&lt;/tr&gt;&lt;tr&gt;";
    }
    }

echo "&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
</code></pre>

<p>but with this code everything goes wrong and it doesnt break after each 3 images in row</p>

<p>i even used </p>

<pre><code>if ($i&gt;2) {
    echo "&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;";
}
</code></pre>

<p>but as u know it only breaks the tr after  image number 3  not every row </p>

<p>im really sorry for my foolish question</p>
