I have a big number of files within a directory and I want to search for specific files with PHP
glob function. This is my code:
/* SAMPLE FILE NAME: PR330037JED10220161204.csv */ $dir = 'Files/Payment/'; $prefix = 'PR'; $vendorNo = '330037'; $region = 'JED'; $date = '20161204'; $files = glob($dir.$prefix.$vendorNo.$region."*".$date.".csv");
It works fine, but I would like to check if the date part matches a range of dates. How do I change the glob expression?