title: PHP Delete Directory that is not empty
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://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>I know that you can remove a folder that is empty with rmdir. And I know you can clear a folder with the following three lines. </p>
  
  <pre><code>foreach($directory_path as $file) {
         unlink($file);
  }
  </code></pre>
  
  <p>But what if one of the files is actually a sub directory. How would one get rid of that but in an infinite amount like the dual mirror effect. Is there any force delete directory in php?</p>
  
  <p>Thanks</p>