Hellow guys, hope sum1 can help me, It might be really simple for most but Loops are still impossible to me.
Heres what I wanna do:
Create a table on PHP 3 rows and 3 cols. I have a mysql_query = 9 records, so I would like that everytime it creates 3 <td> it automatically insert a <tr>, I'm using Dreamweaver CS3 and the Repeat Region Server Behavior... so far I can create the 1st line with 3 unrepeated records, I tryed to make a few FOR($i...) intenting to insert a <TR> every 3rd time the script is run... but on the PHP code generated by the Dreamweaver what I understood is that it will go on creating the <TDs> untill reaches 9.
Can sum1 pleeeease help me? I'm still learning and Loops are so so dificult for me to understand I dont know what to do :S.
Here is the cone I have so far:
<?php for ($i=0; $i<1; $i++) { ?> // this for I tried to control the loop
<?php do { ?>
<td class="td"><a href="#"><img src="images/<?php echo $row_list_usrcars['carPic'];?>" width="63px" height="80px" /><br/>
<?php echo $row_list_usrcars['carName']; ?></a></td>
<?php } while ($row_list_usrcars = mysql_fetch_assoc($row_list_usrcars)); ?>
<?php if ($i==0) echo "</tr><tr>";} ?> // no success :(
Thanks in advance eveyone.