Skip to content

Instantly share code, notes, and snippets.

@cogentParadigm
Created September 19, 2012 23:35
Show Gist options
  • Save cogentParadigm/3753037 to your computer and use it in GitHub Desktop.
Save cogentParadigm/3753037 to your computer and use it in GitHub Desktop.
PHP Snippets
<?php
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
//$entry is the file or directory name
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment