1

I have the folder structure like below

folder1
folder2
fodder3

and all these folderrs contains files like

blah.html
blabla.html

Now i can get the folder names with below code.But how can i also get all the html file names inside those folders ?(only html files not other files)

$dir= glob($path . '/*' , GLOB_ONLYDIR);
Anisha Gowda
  • 59
  • 1
  • 6

1 Answers1

0

Check, if it will help you.

foreach (glob($path . '/*' , GLOB_ONLYDIR) as $dir) {
    $files = glob($dir . '/*.html');

    echo '<pre>'; print_r($files);
}
prava
  • 3,916
  • 2
  • 24
  • 35