Page 1 of 1

sorting images into groups of 4

Posted: Fri Apr 01, 2005 12:40 pm
by andylyon87
Hey guys

just wondering if anyone knew a way of reading the number of files in a folder and putting them into a table of four cells wide.

So say I had 16 images in a file the would be sorted into the most recently added at the top and the oldest at the bottom in a table of 4 cells wide.

Is this possible in php alone without mySQL, cos I have no idea when it comes to that.

Thanks
Andy

Posted: Fri Apr 01, 2005 1:22 pm
by feyd
There is a thread about this specifically (in n-width tables) linked to from the "Useful Posts" thread (see link in my signature.)

Posted: Sat Apr 02, 2005 7:53 am
by andylyon87
well that would be great but my host doesnt have a mySQL databaseon my package.

As said above is there anyway of doing this without mySQL

sory to be a pain

Andy

Posted: Sat Apr 02, 2005 8:42 am
by feyd
you can take the logic parts away from mysql without problem. You simply need to generate a list of the files in the folder to parse. This can be done with glob() or opendir(). :?