Özellikle IE kullanıcıları tarafından izlendi olacak bir web sayfası var, bu yüzden CSS3 söz konusu değildir.
Ben gibi listelemek istiyorum:
A D G
B E H
C F I
İşte şu anda benzeri listeler fonksiyonudur:
A B C
D E F
G H I
function listPhoneExtensions($group,$group_title) {
$adldap = new adLDAP();
$group_membership = $adldap->group_members(strtoupper($group),FALSE);
sort($group_membership);
print "
<a name=\"".strtolower($group_title)."\"></a>
<h2>".$group_title."</h2>
<ul class=\"phone-extensions\">";
foreach ($group_membership as $i => $username) {
$userinfo = $adldap->user_info($username, array("givenname","sn","telephonenumber"));
$displayname = "<span class=\"name\">".substr($userinfo[0]["sn"][0],0,9).", ".substr($userinfo[0]["givenname"][0],0,9)."</span><span class=\"ext\">".$userinfo[0]["telephonenumber"][0]."</span>";
if($userinfo[0]["sn"][0] != "" && $userinfo[0]["givenname"][0] != "" && $userinfo[0]["telephonenumber"][0] != "") {
print "<li>".$displayname."</li>";
}
}
print "</ul><p class=\"clear-both\"><a href=\"#top\" class=\"link-to-top\">↑ top</a></p>";
}
Örnek render html:
<ul class="phone-extensions">
<li><span class="name">Barry Bonds</span><span class="ext">8281</span></li>
<li><span class="name">Gerald Clark</span><span class="ext">8211</span></li>
<li><span class="name">Juan Dixon</span><span class="ext">8282</span></li>
<li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li>
<li><span class="name">Freddie Flank</span><span class="ext">2281</span></li>
<li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li>
<li><span class="name">Kim Moore</span><span class="ext">5767</span></li>
<li><span class="name">Barry Bonds</span><span class="ext">8281</span></li>
<li><span class="name">Gerald Clark</span><span class="ext">8211</span></li>
<li><span class="name">Juan Dixon</span><span class="ext">8282</span></li>
<li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li>
<li><span class="name">Freddie Flank</span><span class="ext">2281</span></li>
<li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li>
<li><span class="name">Kim Moore</span><span class="ext">5767</span></li>
<li><span class="name">Barry Bonds</span><span class="ext">8281</span></li>
<li><span class="name">Gerald Clark</span><span class="ext">8211</span></li>
<li><span class="name">Juan Dixon</span><span class="ext">8282</span></li>
<li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li>
<li><span class="name">Freddie Flank</span><span class="ext">2281</span></li>
<li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li>
<li><span class="name">Kim Moore</span><span class="ext">5767</span></li>
</ul>
Herhangi bir yardım dikey alfa listeye almak için takdir edilmektedir.