# \[PHP\] last uploaded pic

**URL:** <https://forum.kirupa.com/t/php-last-uploaded-pic/168221>\
**Category:** programming\
**Created:** [November 5, 2005, 3:06am UTC](https://forum.kirupa.com/t/php-last-uploaded-pic/168221 "2005-11-05T03:06:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dulcinea](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@Dulcinea](https://forum.kirupa.com/u/Dulcinea)\
**Post date:** [November 5, 2005, 3:06am UTC](https://forum.kirupa.com/t/php-last-uploaded-pic/168221/1 "2005-11-05T03:06:55Z")

</div>

:toad:

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

```auto
  <?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?
