JREAM Posted July 24, 2009 Share Posted July 24, 2009 I almost have it, what do i need to ignore any file? I know if i do it ill end up doing way too long is there an easy way to do this? function themeList ($directory) { $results = array(); $handler = opendir($directory); while ($name = readdir($handler)) { if ($name != '.' && $name != '..') { $results[] = $name; } } closedir($handler); return $results; } Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 24, 2009 Share Posted July 24, 2009 just use http://php.net/is_dir Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 24, 2009 Share Posted July 24, 2009 or actually... $dirs = glob('$',GLOB_ONLYDIR); foreach($dirs as $dir){ } Quote Link to comment Share on other sites More sharing options...
JREAM Posted July 24, 2009 Author Share Posted July 24, 2009 im triyng it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.