rss logo

A simple PHP code to show pictures on a website

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.



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

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

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address