View Single Post
Old 04-22-2009, 09:05 AM   #2 (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

With all of these threads about reading files from a directory, please start separating your code into specific tasks. For this particular thread:
  1. Gather list of images in the directory
  2. Iterate over that list ordering by orientation (landscape/portrait)
  3. Display that sorted list in your required format (JavaScript in this case)

To help you determine which images are landscape or portrait you could use the getimagesize function.
Salathe is offline  
Reply With Quote