title: glob only pulling array if I use wildcard
body: <p>I'm trying to use <code>glob()</code> to find images in my folder that match a pattern. There are too many images to manually search through, so <code>glob()</code> seems like a good approach.</p>
  
  <p>I don't seem to be able to get glob to work, however.</p>
  
  <p>I have 5 images with the following patter: <code>diamond_z_classic_397-106</code> but when I use glob as such:</p>
  
  <p><code>print_r(glob("diamond_z_classic_397-106.*"));</code> then this is what is returned <code>array()</code> . When I do this: <code>pring_r(glob("*.*"));</code> then it pulls everything from the directory included the 5 matches.</p>
  
  <p>I've scanned SO as well as  <a href="http://php.net/manual/en/function.glob.php" rel="nofollow noreferrer">http://php.net/manual/en/function.glob.php</a> and <a href="http://www.w3schools.com/php/func_filesystem_glob.asp" rel="nofollow noreferrer">http://www.w3schools.com/php/func_filesystem_glob.asp</a> to figure out what I'm missing. </p>
  
  <p>What could be causing this, or what am I missing. </p>
  
  <p>Also, is it possible to use a variable like this: <code>glob("$pattern.*");</code> ?</p>
  
  <p>Thanks</p>
  
  <p><strong>Update</strong>
  Here are the 5 exact names that should match the pattern:
  <code>diamond_z_classic_397-106-100-80-100-c-rd-255-255-255.jpg</code></p>
  
  <p><code>diamond_z_classic_397-106-100-80-100-c.jpg</code></p>
  
  <p><code>diamond_z_classic_397-106-120-90-100-c.jpg</code></p>
  
  <p><code>diamond_z_classic_397-106-300-300-100-wm-center_middle-0-ColorCountryAussies-255-255-255-35.jpg</code></p>
  
  <p><code>diamond_z_classic_397-106-800-800-100-wm-center_middle-0-ColorCountryAussies-255-255-255-35.jpg</code></p>