filter files in a directory

From: Date: Mon, 26 Aug 2002 18:03:36 +0000
Subject: filter files in a directory
Groups: php.general 
Request: Send a blank email to php-general+get-114159@lists.php.net to get a copy of this message
I am showing a directory of files and I don't what all the files to show on the screen. I was able to get the . and the .. not to show with what I have below but there are some other files in there that look like this mylist.confg. I don't want them to show in the directory list. I tried && $files != "*.config" but this did not work . Anybody have an suggestions on how to do this . I have look through the manual and the mailing list but can't figure out how to make the pattern to keep this from showing if ($handle = opendir('/path/to/list/directory')) { while (false !== ($files = readdir($handle))) { if ($files != "." && $files != "..") { echo $files; }

« previous php.general (#114159) next »