Hello,
How to put all folders names, which are in 'modules/' directory, to array?
Thanks
function mods() { $result = array(); foreach (glob(MOD_PATH.'/*', GLOB_ONLYDIR) as $dirname) { $result[] = end(explode('/', $dirname)); } return $result; }
It's the best way?