Jump to content

Recommended Posts

Hello All,

 

I am in the process of building a blog and I have a while loop output my blog posts previews on a home page. For example, say I have 30 posts and I want to have 10 on my main page and then have 10 on another and so on. Then there would be buttons at the bottom to go to the next page or the 3rd or 5th page.

 

How could I use php to do this? I have not been able to find any techniques on how to do this. I don't even know what to call it.

 

Thanks in advance,

Link to comment
https://forums.phpfreaks.com/topic/267155-continue-while-loop-on-next-page/
Share on other sites

I think best solution is, PAGINATE your query result.

 

Pagination is a concept you?re familiar with even if you don?t know the term. When you use a search engine like Google, it displays the results as a series of pages and not as one long list.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.