John Nichel wrote:
Heh, you're right. I knew I didn't spend enough time on that answer... What I * should* have said was something like:Chris wrote:
if (is_dir($file) || ($file!=".") || ($file!="..")) continue;
That will match everything and anything, files and dot directories...
The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or ..
while($file = readdir($handle)) { if ('.' == $file || '..' == $file) continue; if(is_dir($handle.'\\'.$file)) $users[] = $file; }
That will work, but it appears you've already sorted the issue out, despite my "help".
Chris
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php