I would like to get all files that have "_img" and the type of PDF in the folder
Instead of using
$fileArray = scandir($dir); foreach ($fileArray as $file) { if (preg_match("_img",$file) && pathinfo($file, PATHINFO_EXTENSION) == 'pdf'){ $filteredArray[] = $file; } }
Are there short cuts or is this the best way? Thanks
source share