How can I use the glob function to get a list of files that match a pattern in PHP? Example code: - Biz Tech

How can I use the glob function to get a list of files that match a pattern in PHP? Example code:

Listen
$files = glob("/path/to/files/*.txt");

print_r($files);