how to get all the files and direcctories from a directory in php code example
Example 1: php get all php files in a directory
foreach(glob('includes/*.php') as $file) {
...
}
Example 2: php list directories
$dir = '.';
$directories = glob($dir . '/*', GLOB_ONLYDIR);