List all images from directory


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. $dir = "assets/images/";
  3. foreach (glob($dir . '/*') as $filename) {
  4. echo "<img src='" . $filename . "'><br/>";
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.