foreach (glob("images/*.{jpg,png,gif}", GLOB_BRACE) as $filename) { echo ""; }