View Full Version : Array Change?

05-01-2007, 08:52 PM
1) Script Title: Photo Album 2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/photoalbum.htm

3) Describe problem: Is it possible to alter the code the the array is read in reverse?

My thought is that the photo album array is read with 0 always being at the front of the album. This means that everytime the album is updated the array needs to be changed.

var myvacation=new Array()
myvacation[0]=["0.jpg", "", "photo.jpg"]
myvacation[1]=["1.jpg", "", "photo1.jpg"]
myvacation[2]=["2.jpg", "", "photo2.jpg"]
myvacation[3]=["3.jpg", "", "photo3.jpg"]
myvacation[4]=["4.jpg", "", "photo4.jpg"]
myvacation[5]=["5.jpg", "", "photo5.jpg"]

It would make updating the album easier if the last number [5] was the first image in the album and 0 was the last item to be displayed. Is this possible?

05-01-2007, 08:55 PM

05-01-2007, 09:09 PM
Worked prefectly!