title: remove dot and double dot from result php
body: <p>i am using below code for directory list it is work as i think but it have little issue when out put it show dot and double dot is there any way to ignore this </p>
  
  <p>code </p>
  
  <pre><code>$myDirectory='C:\UniServer\www\list';
  $files = scandir($myDirectory);
  foreach ($files as &amp;$value) {
  echo   $myDirectory.'\\'.$value.'&lt;br&gt;';
  }
  </code></pre>
  
  <p><strong>out put</strong></p>
  
  <pre><code>.
  ..
  0-9.txt
  a.txt
  b.txt
  c.txt
  d.txt
  e.txt
  f.txt
  g.txt
  i.txt
  j.txt
  k.txt
  l.txt
  m.txt
  n.txt
  o.txt
  p.txt
  q.txt
  r.txt
  s.txt
  t.txt
  u.txt
  v.txt
  w.txt
  x.txt
  y.txt
  z.txt
  </code></pre>
  
  <p><strong>thanks u_mulder i converted in function now</strong> </p>
  
  <pre><code>function folder_list($myDirectory) {
  $files = scandir($myDirectory);
  foreach ($files as &amp;$value) {
      if ($value != '.' &amp;&amp; $value != '..')
          echo   $myDirectory.'\\'.$value.'&lt;br&gt;';
  }        
  }
  </code></pre>