Learn how to add numbered HTML links for each page in the pagination results so that users can jump directly to a desired page.
- [Instructor] In addition to having previous…and next page links, it's very common if we have…a lot of results to have numbered pages as well.…So we can jump directly to the page that we want…instead of having to page through each one…of the pages in sequence to get to the results we want.…In this movie, we're going to learn how to create those links.…I'm going to put my numbered links in between my previous…and next link just like we saw with Google, right?…Google has all the Os in their name…and they have previous and next links on either side.…That's the idea here.…
So we want to make a loop.…So what is our loop going to be?…We want it to be from one all the way up to…the total number of pages.…So let's write a loop that does that.…We can do that with a for loop, for i equal to one.…So it's going to start out being initialized at one.…And while i is less than or equal to pagination total pages.…So while it's less than or equal to the number…of total pages, let's keep going through…and we're going to increment i each time through the loop.…
Note: This is an intermediate-level training course that assumes you have existing knowledge of PHP. To refresh your skills, check out PHP Essential Training and PHP: Object-Oriented Programming.
- Creating a project database and tables
- Connecting to the database
- Database queries with OOP
- The active record design pattern
- Defining a database-driven class
- Performing common database tasks with OOP
- Creating inheritable and reusable code
- Object-oriented user authentication
- Object-oriented pagination
Skill Level Intermediate
Consuming RESTful APIs in PHP with Guzzlewith Justin Yost2h 12m Intermediate
PHP: Accessing Databases with PDO and MySQLiwith David Powers3h 47m Intermediate
1. Overview and Project Setup
2. The Database Connection
3. Define a Database-Driven Class
4. Object-Oriented CRUD
5. Object-Oriented Authentication
6. Object-Oriented Pagination
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.