title: php--glob for searching directories and .jpg only
body: <p>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…</p>
  
  <p><code>$array = glob(‘stuff/{*.jpg}’, GLOB_BRACE);</code></p>
  
  <p>and to search for only subdirectories is…</p>
  
  <p><code>$array = glob(‘stuff/*’, GLOB_ONLYDIR);</code></p>
  
  <p>…but how do I combine the two without getting any other unwanted files? Is there a pattern for subirectories for GLOB_BRACE? </p>