tu masz przykład mojego kodu na 4 zdjecia w jednym wierszu:
<?php
<table border='0'><tr>";
$img = Array('1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.JPG', '10.JPG', '11.JPG', '12.JPG', '13.JPG', '14.JPG', '15.JPG', '16.JPG', '17.JPG', '18.JPG', '19.JPG', '20.JPG', '21.JPG', '22.JPG', '23.JPG', '24.JPG', '25.JPG', '26.JPG', '27.JPG', '28.JPG', '29.JPG', '30.JPG', '31.JPG', '32.JPG', '33.JPG'); $i = 0;
while($i<count($img)))
{
print "<td><a href='img/gallery/".$img[$i]."' rel='lightbox[roadtrip]'> <img src='img/gallery/".$img[$i]."' width='200' height='150' alt='' border='0'>
</a></td>";
$i++;
if($i%4
== 0
) {print "</tr><tr>";} }
?>