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.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}