title: loop through the files in a folder in php
body: <p>i have searched through the Internet and found the scrip to do this but am having some problems to read the file names.</p>
  
  <p><strong>here is the code</strong> </p>
  
  <pre><code>$dir = "folder/*";
   foreach(glob($dir) as $file)  
   {  
   echo $file.'&lt;/br&gt;';  
  }
  </code></pre>
  
  <p>this display  in this format</p>
  
  <pre><code>folder/s0101.htm
  folder/s0692.htm
  </code></pre>
  
  <p>for some reasons i want to get them in this form.</p>
  
  <pre><code>s0101.htm
  s0692.htm
  </code></pre>
  
  <p>can anyone tell me how to do this?</p>