Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head><title></title></head>
- <body>
- <table><tr>
- <?php
- define('Photo_dir','img');
- define('Columns',2);
- $x=0;
- $y=0;
- $results = scandir(Photo_dir);
- foreach ($results as $result)
- {
- if ($result === '.' or $result === '..') continue;
- if (is_dir(Photo_dir.'/'.$result))
- {
- if($y > 2)
- {
- echo "</tr><tr>";
- $y=0;
- $x=&x+1;
- }
- echo "<td><img src='image.php?photo=".Photo_dir."/".$result."/1.jpg'/></td>";
- echo "kod w html";
- }
- }
- ?>
- </tr>
- </table>
- </body>
- </html>
- $x = $x +1;
- $x++;
- <img src='image.php?photo=".Photo_dir."/".$result."/1.jpg'/>
- ^ that one.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement