View Full Version : Flat File Pagination
11-07-2006, 02:23 PM
I'm using a flat file to keep the data for my downloadable files. I'm using the explode function to take info and make it an array. It works extremely well for my purposes. Now I have gotten to the point where there are too many downloads. Is there any easy way of making a pagination, displaying 10 items per page from the flat file (.txt)?
Google comes up with MySQL pagination, not flat file.
11-07-2006, 02:58 PM
Hard to tell without seeing the PHP script.
When you print out your array, line by line, you'll have a counter
variable that stops the listing and displays a link to continue on.
So, you'll have a subroutine (function) in your PHP script that handles
just the printout based on the line count.
11-07-2006, 03:05 PM
I've decided to change to MySQL now. Flat files are a pain in the arse.
11-07-2006, 04:10 PM
With many entries, that's a good decision.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.