I have this code
$headers = array_reverse($headers);
$x = 1;
foreach ($headers as $val) {
$header = imap_headerinfo($link, $x, 80, 80);
$subject= $header->fetchsubject;
$from= $header->fetchfrom;
$date= $header->date;
$date2 = strtotime($date) ;
$unseen= $header->Unseen;
echo $date;
}
and it shows the emails oldest to newest, i want it around the other way...
how can i change this?