Skip to content

Instantly share code, notes, and snippets.

@joomlapro
Created August 2, 2012 18:49
Show Gist options
  • Save joomlapro/3239639 to your computer and use it in GitHub Desktop.
Save joomlapro/3239639 to your computer and use it in GitHub Desktop.
Read image on directory
$directory = 'uploads/';
// Get all image files with a .jpg extension.
$images = glob($directory . "*_small.jpg");
// Print each file name
foreach($images as $image)
{
echo '<img src=' . $image . ' />';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment