I'm trying to create a gallery in php, but I don't know how to add new rows. That is I want only 5 images per row to show up. How can i generate the code so that it every 5 photos closes and then opens again the <tr> tag?
while($row= mysql_fetch_array($res)) {
print("<td><a href=\"show_picture.php?image=".$row['photo']."&cat=".$row['cat']."\"><img src=\"images/gallery/small_".$row['photo'].".jpg\"></a>");
}