O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

scandir

Synopsis

array scandir(string path [, int sort_order [, resource context]])

Returns an array of filenames existing at path, in the streams context context if provided, or false if an error occurred. The filenames are sorted according to the sort_order parameter, which is one of the following types:

SCANDIR_SORT_ASCENDING (default)

Sort ascending

SCANDIR_SORT_DESCENDING

Sort descending

SCANDIR_SORT_NONE

Perform no sorting (the resulting order is undefined)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required