delete all files in a folder with php
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1334398/how-to-delete-a-folder-with-contents-using-php">how to delete a folder with contents using PHP</a>  </p>
</blockquote>



<p>hi,</p>

<p>is it possible to delete all children within a parent directory and then delete the the parent directory in php?</p>

<p>Edited:</p>

<p>When i use scan dir why does the first 2 elements of the array show '.', '..'?: </p>

<pre><code>&gt; Array ( [0] =&gt; . [1] =&gt; .. [2] =&gt; evga-nvidia-graphics-card4d0fe6868d2f8.jpg [3] =&gt; image4d0eaafb920a0.png [4] =&gt; image4d0eab086a106.png ) 
</code></pre>

<p>many thanks</p>
