Hi,
how do I have to change/edit my code that the output is sort by the
file name (from a-z)?
<?php
$nr= 0;
$handle=opendir ($path);
while($datei = readdir($handle )) {
if (preg_match('/^w+.htm$/', $datei)) {
$filearray = file("$datei");
$filestring = implode("",$fil earray);
echo "<tr>";
echo "<td class=\"text\" width=\"4%\">". ++$nr."</td>";
echo "<td class=\"text\" width=\"32%\">
<a class=\"link\" href=\"$datei\"
target=\"_blank \">$datei</a></td>";
echo "<td class=\"verantw \" width=\"32%\">" ;
if (eregi ("!!!!(.*)!!!!" , $filestring, $verantwortlich er)) echo
$verantwortlich er[1];
else echo ' ';
echo "</td>";
echo "<td class=\"text\" width=\"32%\">" ;
if (eregi ("<title>(.* )</title>", $filestring, $titel)) echo
$titel[1];
else echo ' ';
echo "</td>";
echo "</tr>";
}
}
?>
Thanks!
how do I have to change/edit my code that the output is sort by the
file name (from a-z)?
<?php
$nr= 0;
$handle=opendir ($path);
while($datei = readdir($handle )) {
if (preg_match('/^w+.htm$/', $datei)) {
$filearray = file("$datei");
$filestring = implode("",$fil earray);
echo "<tr>";
echo "<td class=\"text\" width=\"4%\">". ++$nr."</td>";
echo "<td class=\"text\" width=\"32%\">
<a class=\"link\" href=\"$datei\"
target=\"_blank \">$datei</a></td>";
echo "<td class=\"verantw \" width=\"32%\">" ;
if (eregi ("!!!!(.*)!!!!" , $filestring, $verantwortlich er)) echo
$verantwortlich er[1];
else echo ' ';
echo "</td>";
echo "<td class=\"text\" width=\"32%\">" ;
if (eregi ("<title>(.* )</title>", $filestring, $titel)) echo
$titel[1];
else echo ' ';
echo "</td>";
echo "</tr>";
}
}
?>
Thanks!
Comment