Possible Duplicate:
how to delete a folder with contents using PHP
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.
foreach($directory_path as $file) {
unlink($file);
}
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?
Thanks