$dirname = "media/images/iconized/"; $images = glob($dirname."*.jpg"); foreach($images as $image) { echo '
'; }