PHP list of specific files in a directory

You’ll be wanting to use glob()

Example:

$files = glob('/path/to/dir/*.xml');

Leave a Comment