Skip to content

Instantly share code, notes, and snippets.

@jbroadway
Created May 1, 2012 17:26
Show Gist options
  • Save jbroadway/2569833 to your computer and use it in GitHub Desktop.
Save jbroadway/2569833 to your computer and use it in GitHub Desktop.
List several image galleries
<?php
$galleries = glob ('files/galleries/*');
echo '<ul>';
foreach ($galleries as $gallery) {
// list galleries here
echo '<li><a href="/myapp/gallery?path=' . str_replace ('files/', '', $gallery) . '">' . basename ($gallery) . '</a></li>';
}
echo '</ul>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment