View Single Post
Old 11-17-2010, 10:47 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Two similar ideas:
  1. First put the files into an array using opendir/readdir/closedir, then sort that array with one of the array sorting functions.
  2. or, use the glob() function to retrieve an array of the files sorted in alphabetical order.
Salathe is offline  
Reply With Quote