View Single Post
Old 06-17-2009, 06:04 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

For the glob, look into GLOB_BRACE (on the glob manual page if you want to look for multiple discrete possibilities (such as .doc and .docx). For the $no_ext line, you could call pathinfo($basename, PATHINFO_FILENAME) which will cut off the extension whatever it is.
Salathe is offline  
Reply With Quote