Page 2 of 2

Posted: Tue Oct 31, 2006 11:13 pm
by Mr Tech
Jenk wrote:You could integrate http://us2.php.net/manual/en/function.fnmatch.php or just plain old preg_match().

Code: Select all

foreach (glob($dir . '/*') as $file)
{
    if (preg_match('/' . $pattern . '/i', $file)) $files[] = $file;
}
Woohoo! That code worked. Thanks mate.