title: Ordering output when using readdir()
body: <p>I'm fairly new to PHP and have been using PHP's readdir() to look into a folder full of images and render them out dynamically based on how many images there are in that folder.  Everything works great, but one thing I've noticed is that the images are not displayed in the order that they appear on my local machine HD.  </p>
  
  <p>So my question to anyone who knows PHP is, is there way of using PHP to read the contents of a folder AND display them in order without having to rename the actual file names e.g. 01.jpg, 02.jpg etc etc?    </p>