title: RecursiveDirectoryIterator Removing Dot folders
body: <p>Currently I have the code below what would be the best way for me to be able to set the flags in the code below so I can use <code>::SKIP_DOTS</code>?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>  $folder = 'images/banner_img';?&gt;
  
      &lt;?php foreach( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($folder)) as $filename): ?&gt;
        &lt;?php $fileTypes = array("db"); 
              $fileType  = pathinfo($filename,PATHINFO_EXTENSION);
  
              if(!in_array(strtolower($fileType), $fileTypes)):?&gt;
  
  
           &lt;img src="&lt;?php echo $filename; ?&gt;" alt="" title="" data-thumb="&lt;?php echo $filename;?&gt;" /&gt;
  
         &lt;?php endif;?&gt;
  
      &lt;?php endforeach;?&gt;
  </code></pre>