[PHP] last uploaded pic

:toad:

I’m listing the names of the pics I have in a folder like this:

  <?php
foreach (glob("*.jpg") as $filename) {
echo '<a href="'.$filename.'">'.$filename.'</a> size ' . filesize($filename) . "<BR>";
}
?>

I want to show at the start the last uploaded picture, how can I do that?