I am trying to use PHP to get an array of all of the filenames within a directory that match any strings in an array.
The array of strings to search looks like this:
$users = array('user1', 'user2', 'user3');
What I am hoping to get is a list of files matching any of these strings back in an array like this:
$files = array('user1_resume.pdf', 'user1_statement.pdf', 'user2_resume.pdf');
How should I do this in PHP?
ls user1* user2* user3*