'; $filepath = "./images/smileys/"; unset($files); if ($dh = opendir($filepath)) { while($file = readdir($dh)) { if (ereg("\.gif",$file)) $files[] = $file; } closedir($dh); } if (is_array($files)) { sort($files); foreach($files as $file) { $smiley = explode(".", $file); echo''; } echo '
Smiley:Tag:
:'.$smiley[0].':
'; } ?>