PDA

View Full Version : PHP Photo Album script (sorting)



DaZZ
01-29-2006, 10:29 PM
PHP Photo Album script
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

First off - Great script. But I have but one question. When installing and using it I have noticed that the outputted images aren`t sorted in anyway. How do I go about sorting the A - Z / 0 - 9. The format of my images are "image_0001, image_0002, image_0003 etc" and I would like "image_0001" to be the first on page 1 then work through to "image_0099"

jscheuer1
01-30-2006, 10:16 AM
galleryarray.sort()

A good place for this would be just after the script credit:


/***********************************************
* PHP Photo Album script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

galleryarray.sort()

Untested but, should work.

DaZZ
01-30-2006, 11:44 AM
Worked a treat. Thank you.