Jump to content

Pagination - but with one record?


HFD

Recommended Posts

Hi, I've been researching pagination in PHP, and so far all I've come across is outputting a certain number of rows on one page, and another set on the next page...i.e. like a search engine. This would be ideal for listing my tutorials, but not for what I want...

 

But what I hope to do is be able to split up my content into smaller chunks, as I'll be writing some rather large tutorials. Each row in my database is a seperate row, I want to split the 'content' field of each into different pages, maybe starting a new page when it encounters a certain line of text in the field...etc.

 

Is this possible?

 

Thanks :)

Link to comment
https://forums.phpfreaks.com/topic/120380-pagination-but-with-one-record/
Share on other sites

you can cut off the content field at a certain marker, but that would probably be more work for the database server than just grabbing the whole field.  if you do grab the whole field, you can chunk it using PHP and perhaps this would allow much smoother page turning - since it's all out already, you could just use some dynamic JS/CSS work to flip pages rather than needing to force a reload.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.