Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $picList = array();
- for ($i = 0; $i < 200; $i++)
- $picList[] = "pic$i.jpg";
- $c = 1;
- $div1 = 30;
- $div2 = 6;
- $l = array();
- $tmpl1 = array();
- $tmpl2 = array();
- foreach ( $picList as $p ) {
- $tmpl2[] = $p;
- if ( !( $c % $div2 ) ) {
- $tmpl1[] = $tmpl2;
- $tmpl2 = array();
- }
- if ( !( $c % $div1 ) ) {
- $l[] = $tmpl1;
- $tmpl1 = array();
- }
- $c++;
- }
- echo "<ul>";
- foreach ( $l as $tbl ) {
- echo "<hr />";
- echo "<li>";
- echo "<table border=\"1\">";
- foreach( $tbl as $tr ) {
- echo "<tr>";
- foreach( $tr as $td ) {
- echo "<td>$td</td>";
- }
- echo "</tr>";
- }
- echo "</table>";
- echo "</li>";
- }
- echo "</ul>";
Add Comment
Please, Sign In to add comment