I found a solution to the above problem and its this:
PHP Code:
<?php
$i=0;
$members = mysql_query("select * from members");
echo '<table><tr>';
while ($row = mysql_fetch_row($members)) {
$i++;
if ($i % 5 == 0) {
echo '<td>'.$row[1].'<br><img src="'.$row[3].'" width=45 height=45></td></tr><tr>';
}else{
echo '<td>'.$row[1].'<br><img src="'.$row[3].'" width=45 height=45></td>';
}
}
echo '</tr></table>';
?>
Any ideas how to limit the table to just 5 rows of 5 columns and then display a link that when clicked displays another table of 5 rows of 5 columns with the next lot of data in it ?