Skip to content

Instantly share code, notes, and snippets.

@voising
Last active December 18, 2015 13:29
Show Gist options
  • Save voising/5789930 to your computer and use it in GitHub Desktop.
Save voising/5789930 to your computer and use it in GitHub Desktop.
PHP : list a directory #listdir
<?php
$files = scandir(__dir path__);
$filesChoice = array();
foreach ($files as $val):
if ($val[0] != ".")
$filesChoice[$val] = $val;
endforeach;
asort($filesChoice);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment