I have this PHP script here
$z = range(2, 123);
echo '<table width="100%">';
foreach($z as $x){
echo '<td><a href="http://www.mysite.net/' . $x . '/"><img src="http://www.mysite.net/' . $x . '/5.jpg" width=200></a></td>';
}
echo '</table>';
What I am trying to do is get 6 items in the table row and then a new row…how would I do this?
Thanks,
J
Here the modulo operator comes in. You can divide and calculate the remainder. Everytime the remainder is
0you add a new row: