Recursive Iterator


/ Published in: PHP
Save to your folder(s)

By requinix


Copy this code and paste it in your HTML
  1. $diriterator = new RecursiveDirectoryIterator("images");
  2. $iterator = new RecursiveIteratorIterator($diriterator, RecursiveIteratorIterator::SELF_FIRST);
  3. foreach ($iterator as $file) {
  4. if (strcasecmp(substr($file, -4), ".xml") == 0) echo $file, "\n";
  5. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.