לש"ש
תנסה:
PHP קוד:
<?php
$dir = "styles/red/images/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if(substr($file,strrpos($file'.')+1)=='gif'||substr($file,strrpos($file'.')+1)=='GIF')
echo "<img src=styles/red/images/$file>";
}
closedir($dh);
}
}
?>