Return to Snippet

Revision: 16461
at August 5, 2009 02:48 by smoover


Initial Code
$diriterator = new RecursiveDirectoryIterator("images");
$iterator = new RecursiveIteratorIterator($diriterator, RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $file) {
    if (strcasecmp(substr($file, -4), ".xml") == 0) echo $file, "\n";
}

Initial URL
http://forums.devshed.com/php-development-5/need-help-implementing-custom-class-629622.html

Initial Description
By requinix

Initial Title
Recursive Iterator

Initial Tags
file, directory

Initial Language
PHP