|
Posted by Chung Leong on 10/24/91 11:34
Don't be a dope--use glob():
$files = glob("pictures/*.{jpg,JPG,jpeg,JPEG,gif,GIF}", GLOB_BRACE);
foreach($files as $file) {
$filename = basename($file);
echo "<a href='$file'>$filename</a><br>";
}
http://fi.php.net/glob/
P.S. The reason you're not seeing the other pics is probably because
you're using a case-sensitive regexp.
[Back to original message]
|