Hi,
specify a variable outside the while loop like
$pics_per_row=4;
$max_results should be something linke 24 or 28 instead of 25 if you want to print 4 pics a line.
inside the while loop at the beginning:
<?PHP
if ($a%$pics_per_row == 0)
echo ($a!=0 ? "</tr>" : "")."<tr>";
?>
Don't forget to put <td> and </td> around the link
Put the
echo "</tr></table>";
outside the while loop and maybe replace it by:
while ($a%$pics_per_row != 0) {
echo "<td> </td>";
$a++;
}
echo "</tr></table>";
to make sure that the current row gets finished.
Put the $a = $a +1 line inside the while loop (at the end of the loop and maybe replace it by $a++).
Thomas