How do you create pagination in PHP?

Answer:
A good google search will provide you a few hundred example, but there are some styles used over and over.

The thinking

Basically, the trick is to get the total number of items to display, and the number to display. Next, you want to get the items between page_number * number_of_items_per_page and (page_number +1) * number_of_items_per_page.

Have a look at the examples in the related links.
Note: There are comments associated with this question. See the discussion page to add to the conversation.
First answer by Afroxav. Last edit by Afroxav. Contributor trust: 367 [recommend contributor recommended]. Question popularity: 1 [recommend question].