Re: How would I get a list of all files matching a pattern?



..oO(laredotornado)

What I mean is let's say I have these files in a directory

/usr/local/apache2/htdocs/myfiles/file1.jpg
/usr/local/apache2/htdocs/myfiles/file2.jpg
/usr/local/apache2/htdocs/myfiles/file3.jpg
/usr/local/apache2/htdocs/myfiles/file4.jpg

The directory would be "/ur/local/apache2/htdocs/myfiles", the prefix
would be "file" and I'm looking for some way in PHP to return
"file1.jpg", "file2.jpg", "file3.jpg", and "file4.jpg", preferrably in
some kind of array.

http://php.net/glob

Micha
.