What if I want to search for a only subdirectories AND certain file types. Ex. I have a folder named “stuff” where random stuff is uploaded. And say I want to search for just subfolders AND .jpg files within “stuff” and nothing more. I know to search for only .jpg is…
$array = glob(‘stuff/{*.jpg}’, GLOB_BRACE);
and to search for only subdirectories is…
$array = glob(‘stuff/*’, GLOB_ONLYDIR);
…but how do I combine the two without getting any other unwanted files? Is there a pattern for subirectories for GLOB_BRACE?