How do i display this the other way around so the inbox is at the top???
<?php
$MAILSERVER="{localhost:143}$mailbox" ;
$link =imap_open($MAILSERVER,$user,$pass);
$headers=imap_headers($link);
$list = imap_list($link, "{localhost}", "*");
echo "<font size='1' face='verdana'>";
foreach ($list as $val) {
list($o1, $o2) = explode('}', $val);
list($o3, $o4) = explode('.', $o2);
$fname= imap_utf7_decode($o4);
if ($fname == "") {
echo "<font face='MV Boli'> »</font>";
echo " ";
echo "<a target='_top' href='index.php?mailbox=INBOX.$fname'>";
echo "INBOX";
echo "<br>";
} else {
echo "<font face='MV Boli'> »</font>";
echo " ";
echo "<a target='_top' href='index.php?mailbox=INBOX.$fname'>";
echo $fname;
echo "<br>";
}
echo "</a>";
}
?>
and it displays like this currently
» Personal
» Personal
» Drafts
» Sent
» Trash
» INBOX