How would one go about efficiently determining the amount of directories in a directory in PHP?
For example, lets say I have this as a structure:
/Directory/ -->
... /Directory 1/
... /Directory 2/
... /Directory 3/
... File.txt
... Filed2.txt
Would be great to know that their are 3 Directories, so as not to include the current or files themselves.
1 Answer