Tim Streater wrote: > When scanning a directory I do this (leaving out error handling and recursion details): > > $start = '/path/to/here' > > $dirh = opendir ($start); > > while (true) > { > > $nextfile = readdir ($dirh); > if ($nextfile===false) break; > > Seems to work. A caveat: when opendir() fails (because the directory doesn't exist, for instance), it returns false. However, readdir(false) returns null, so you would have an infinite loop. -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php