Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
read diles in directory
if ($handle = opendir('directory')) {
/* This is the correct way to loop over the directory. */
while (false !== ($entry = readdir($handle))) {
if($entry == '..' || $entry == '.'){
$lists[] = $entry;
foreach($lists as $listKey => $listName){
echo basename($listName, '.pdf')."\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.