Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Get (recursive) Directory Listing In Array #2

DZone's Guide to

Get (recursive) Directory Listing In Array #2

· ·
Free Resource
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));
} 

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}