Mailinglisten-Archive |
Hi,
On Thu, Feb 03, 2000 at 10:53:05AM +0100, Rene Paschold wrote:
> <?
> $liste=opendir('../images/');
> while ($datei = readdir($liste)) {
> echo "<option value=\"".$datei."\">".$datei."</option>\n";
> }
> closedir($liste);
> ?>
>
> Leider zeigt er mir auch folgendes an:
>
> .
> ..
>
> Wie kann ich das unterdrücken?
Du überlegst dir einfach eine if-Abfrage, die "." und ".."
abfängt:
if ($datei!="." && $datei!="..") {
echo "<option value=\"$datei\">$datei</option>\n";
}
--
Björn Schotte Fon: 0931 / 78 43 79 2
<http://www.php-center.de/> Fax: 0931 / 78 43 79 5
<http://www.web-cards.de/>
php::bar PHP Wiki - Listenarchive