Hello,

I am not very experienced in programming php and mySQL but I think the question I have should be quite simple to answer... only I don't get it!

I have a table with links to jpg files as well as headlines etc. in my database.
I am trying to dynamically display the pictures with headlines on a HTML-page.

There should be 3 picture/headline pairs in a row and then a new row is supposed to begin.

My code breaks up after the first row and I don`t know why...
can anyone please help me?? Thank you.

PHP Code:
...
<table width="100%"  border="0" cellspacing="5" cellpadding="10">

  <?php do { ?>
<tr>

    <?php for ($i=1;$i<4;$i++) { ?>
        <td>
            <table width="33%"  border="0" cellspacing="5" cellpadding="10">
                <tr>
                    <td>
<img src="<?php echo $row_Recordset2['bildURL']; ?>" alt="" name="PicA">
                    </td>
                </tr>
                <tr>
                    <td><?php echo $row_Recordset2['titel']; ?></td>
                </tr><?php $row_Recordset2 mysql_fetch_assoc($Recordset2); ?>
            </table>
        </td>
        
    <?php ?>
</tr>
  <?php } while ($row_Recordset2 mysql_fetch_assoc($Recordset2)); ?>

</table>
</body>
</html>
<?php mysql_free_result($Recordset2); ?>