Hi everyone,
I would like to divide the contents of an array into different pages, but can't seem to figure out how it is done.
Here is a simple outline of what my script is supposed to do:
1) Read video files from a folder
2) Determine number of files and their names
3) Remove file extension from all names
4) Put all file names into a string, separating the file names with || (double pipe)
5) Using the double pipe, divide the contents of the string into an array
6) Display x number of files per page, with each file hyper-linked
7) Display "previous" and "next" page links and a link for each set of x number of files (for example: Previous Page | Page 1 | Page 2 | Page 3 | Next Page )
8) All of the above must be created on the fly, on one page called default.asp, using QueryString passing.
So, I'm able to accomplish everything up to #5, but after that, I have no idea how to divide the Array in such a way that it will only display x number of files in the folder. I'm able to display all files on one page, that's no problem, but I can't seem to wrap my mind around the process of "paginating" or "paging" the contents of the Array, similar to the way database information is divided into "pages". Keep in mind that the application will not have definite numbers to use, but must be able to "page" the results, no matter how many files are in the folder, as it will always be different.
I obviously don't expect anyone to code this out for me, but maybe just point me in the right direction regarding concepts or ideas, then maybe I can code it from there.
Thank you in advance for any help,
Louis.
<message edited by Louistar on Saturday, July 21, 2007 4:43 PM>