dprichard Posted May 6, 2008 Share Posted May 6, 2008 I know that I can do the following to loop something $i=1; while $i<5 { } $i++; I have an array that I am looping through and I am trying to figure out how to loop horizontally and every 4 TD throw it down to the next row. So, loop for 4 horizontally, then break it with a </tr><tr> to start a new row. I am just having a little trouble figuring this out. Any help would be greatly appreciated. <table width="872"> <tr> <?php while ($row_ticketdetails = mysql_fetch_array($ticketdetails)) { ?> <td height="120" align="left" valign="top" class='criticaldetails'><div class="criticaltext"> Subject: <?php echo $row_ticketdetails['subject']; ?><br /> Name: <?php echo $row_ticketdetails['fullname']; ?><br /> Email: <?php echo $row_ticketdetails['email']; ?><br /> Phone: <?php echo $row_ticketdetails['phoneno']; ?></div> </td> <?php } ?> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/104349-horizontal-looping-within-another-while-loop/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.