get all files in a folder into an array 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);