manual for readdir | search for "readdir"
Manual © 2001-2008 The PHP Group
readdir
Description
string readdir ( resource dir_handle)Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem.
Please note the fashion in which readdir()'s return value is checked in the examples below. We are explicitly testing whether the return value is identical to (equal to and of the same type as--see Comparison Operators for more information) FALSE since otherwise, any directory entry whose name evaluates to FALSE will stop the loop (e.g. a directory named "0").
Note that readdir() will return the . and .. entries. If you don't want these, simply strip them out:
© 2008 phparadise | go to the top | search phparadise | generated in 0.038 seconds
21 hits by 13 users in the last 30 minutes.