+ 3

Pagination With Div Element

Hi friends. I want to create pagination or link pager but not usually tables. Ex: <div class = "row"> <?php foreach ($rows as $row) { ?> <div class = "title"> <?php echo $row['title']; ?> </div> <div class = "content"> <?php echo $row['content']; ?> </div> <?php } ?> </div> When count of all content 30, i want to show that 10 content in one page. How i can create pager content with div element.?

11th Mar 2017, 12:49 AM
Zainal Mubarok
Zainal Mubarok - avatar
5 Antworten
+ 7
I've developed projects with pagination before, but I won't be able to fit all information in this comment. I hope this tutorial helps you get a general understanding of how it works. If you want 10 per page, you've got have a variable that sets this as the limit and echos accordingly - in a loop. And try placing your content in their own divs after row so it's easier to manipulate in terms of styling and other: it will look like this after <div class="row"> <div class="content-section"> <div class="title">Pagination</div> <div class="content">.......</div> </div> <div class="content-section"> <div class="title">Components</div> <div class="content">.......</div> </div> // and so on.... </div> http://www.developphp.com/video/JavaScript/Ajax-Pagination-Tutorial-PHP-MySQL-Database-Results-Paged
12th Mar 2017, 2:02 PM
Mark Foxx
Mark Foxx - avatar
+ 5
Oh no, I'm sorry if I confused you at all. I didn't develop that site, but I'm fully capable of designing sites like that. If you want to learn great tips I can point you in the right direction. Just ask me to help you with what you want made, and I'll try my best to create in my code. Are you on Facebook?
14th Mar 2017, 6:00 PM
Mark Foxx
Mark Foxx - avatar
+ 5
@Mark, I'm still waiting for you on Facebook!!
14th Mar 2017, 6:12 PM
Sachin Artani
Sachin Artani - avatar
+ 1
Thanks for the tutorial... i will try that.
13th Mar 2017, 2:31 PM
Zainal Mubarok
Zainal Mubarok - avatar
+ 1
Hi Mark. i like your website tutorial. developphp is great full. i want to build website like that.. can you teach me.?
13th Mar 2017, 10:52 PM
Zainal Mubarok
Zainal Mubarok - avatar