I am displaying some records from the database. Currently I am displaying the top twenty records but I want to show all records with twenty records per page.
How will I use the paging in php to display all records?’
Any Idea about this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like this might work:
The above query will select 10 records with a offset based on the current page.
You will also have to get the total number of pages based on the
$posts_per_page:You will have to keep track of the total number of posts divided with
$posts_per_pageand also the current page, then you can display a prev and next link: