Bootstrap pagination is a collection of css classes that can represent and divide data from a table or general contents.

.PHP function paginationCode()

paginationCode() php function is the main function used to create and return the pagination structure.

This function needs three parameters:

  • $numberOfEntries -> Number of total rows or entities store in the database
  • $nPage -> Number of page that is actually showing
  • $nRows -> Number of rows or entities that you want to show on each page page

.PHP function pageCode()

The code below shows a php function with three parameters as input

  • $id -> ID page link [id="page_'.$id.'"]
  • $value -> Value [<a href="...">$value</a>]
  • $onclickScript -> Script code like like [onclick="json_table('CHANGE-PAGE', event);"]
  • $class -> Variable who wich add different class or disabled/activate a button.

.test yourself

Total number of rows stored in the database The number of rows showing in the table

.more Articles