Benutzer nach PHP LDAP Abfrage sortieren
Hallo,
ich habe ein kleines Problem, ich habe über ein PHP-Script alle Benutzer aus dem LDAP abgefragt und in ein SELECT-Feld gepackt, das Problem ist, das die Einträge nicht sortiert sind. Kann mir jemand helfen?
Das Eintragen in das SELECT-Feld sieht so aus:
<select name="Benutzer" size="1">
<?php
$anzahl = ldap_count_entries($connectid,$search);
for ($i=0; $i<$anzahl; $i++) {
$name = $result[$i]["cn"];
echo '<option>'.$name.'</option>';
}
?>
</select>
MFG
Sascha
ich habe ein kleines Problem, ich habe über ein PHP-Script alle Benutzer aus dem LDAP abgefragt und in ein SELECT-Feld gepackt, das Problem ist, das die Einträge nicht sortiert sind. Kann mir jemand helfen?
Das Eintragen in das SELECT-Feld sieht so aus:
<select name="Benutzer" size="1">
<?php
$anzahl = ldap_count_entries($connectid,$search);
for ($i=0; $i<$anzahl; $i++) {
$name = $result[$i]["cn"];
echo '<option>'.$name.'</option>';
}
?>
</select>
MFG
Sascha
Please also mark the comments that contributed to the solution of the article
Content-Key: 57712
Url: https://administrator.de/contentid/57712
Printed on: April 19, 2024 at 15:04 o'clock
10 Comments
Latest comment