PHP readdir() Function

The readdir() function returns the name of the next entry in a directory.Returns the name of the next entry in the directory. The entries are returned in the order in which they are stored by the filesystem.

Example -

Example -

ParameterDescription
dir_handleOptional. Specifies the directory handle resource previously opened with opendir(). If this parameter is not specified, the last link opened by opendir() is assumed