[code] Warning: preg_match() expects parameter 2 to be string, array given [/code] Hello, the above is the error I am receiving, this is the function... [code] function audio_files($filelist) { $clean_files = array(); $extensions = array('\.mp3', '\.aiff', '\.wav', '\.mid'); //add audio extensions $read_extensions = '(' . implode('|', $extensions) . ')'; if(preg_match("#$read_extensions$#", $filelist)) { $clean_files[] = $filelist; } return $clean_files; } [/code] Note, $filelist contains ftp_nlist(). Now, I'm guessing this could be a problem with my web host, so I'll go 'head and post that to. [code] cPanel 10.8.1-STABLE_31 (PRO 1.0 (RC2)) Apache Core 1.3.34 SpamAssasin 3.1 phpMyAdmin 2.6.1-rc1 PHP 4.4.1 AND 5.0.5 PERL 5.8.6 MySQL 4.1.13-standard-log Processor Name: Intel(R) Celeron(TM) CPU 2.40GHz Processor speed: 2394.027 MHz Processor cache size: 128 KB Operating System: RedHat Enterprise 3 Memory Information: ECC Registered 1024 MB RAM [/code] If anyone could resolve the preg_match() error I am having, please do so...help is appreciated.