I want to return the content (list of files) in a folder to an array. In my dBase program I can filter the content by adding a skeleton file description like this *.pdf
Is there a way to limit/filter the response when using the php command: $files = scandir($dir);
I see in the manual something called $context as in
array scandir ( string $directory [, int $sorting_order = 0 [, resource $context ]] )
When researching that, the manual got a little fuzzy for me.
Could any one complete this line for me
$files = scandir($dir, 1 [, resource $context ] )
where it would only return any .pdf file?