DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Get (recursive) Directory Listing In Array #2

04.13.2005
| 6126 views |
  • submit to reddit
        XoloX's cute function directoryToArray($directory, $recursive) will become "real recursive" by adding the recursion's directory content to array $array_items:
if($recursive) { 
  #directoryToArray($directory. "/" . $file, true); 
  $array_items=array_merge($array_items,directoryToArray($directory. "/" . $file, $recursive));
}