Da bin ich nochmal,
also das Einrücken funktioniert, aber irgendwo habe ich noch einen Denkfehler:
um die beschriebene Ausgabe zu erhalten muss ich wahrscheinlich irgendwo $anzahl zurückzählen, bloss wo?
<code>
function getDirList ($dirName, $anzahl) {
$d = dir($dirName);
while($entry = $d->read()) {
if ($entry != "." && $entry != "..") {
if (is_dir($dirName."/".$entry)) {
$freiraum = $anzahl * 10;
print "<div style="margin-left:".$freiraum."px">".$entry."</div>";
$anzahl += 1;
getDirList($dirName."/".$entry,$anzahl);
$freiraum = 0;
}
else {
$freiraum = ($anzahl+1) * 10;
print "<div style="margin-left:".$freiraum."px">".$entry."</div>";
$freiraum = 0;
}
}
}
$d->close();
}
</code>
danke für Eure Hilfe
ciao
romy
DIE ROMY AUS L. AN DER P. SAGT DANKE UND AUF WIEDERSEHEN
->Alles ist gut wenn es aus Schokolade ist