Intro

Let's say that we have a lot of pictures that we want to show on a website. Here is a PHP code to automaticly show this pictures.

Configuration

Code

<!-- Role : Show multiple pictures
- Author : http://shebangthedolphins.net/
- Instructions  : 
 * Put your pictures inside : ../pictures/
- 1.0 first version -->

<!doctype html>
<HTML>
<HEAD><TITLE>Pictures</TITLE></HEAD>
<H2>Pictures</H2>
        <?php  
                $files = glob('../pictures/*.{jpg,png,gif}', GLOB_BRACE);
                foreach($files as $file) {
                        echo "<img src=\"$file\" style=\"width: 70%; height: 70%\"/><br /><br />";
                }
        ?>
        </BODY>
</HTML>


Licence Creative Commons
This websitehttp://shebangthedolphins.net is licensed to the public under a licence Creative Commons Attribution licence.
Contact :