$config = [ 'base_url' => base_url('/user'), 'per_page' => 10, 'total_rows' => $this->user_model->get_total_rows(), 'num_links' => 5, 'use_page_numbers' => TRUE, 'query_string_segment' => 'page', 'full_tag_open' => '', 'attributes' => ['class' => 'page-link'], 'first_link' => 'First', 'prev_link' => '«', 'next_link' => '»', 'last_link' => 'Last', ]; $this->pagination->initialize($config); $data['users'] = $this->user_model->get_all_users($config['per_page'], $this->uri->segment(3)); $data['pagination'] = $this->pagination->create_links();In this example, we passed the necessary configuration parameters to initialize the pagination library. Once the library is initialized, we pass the limit and start offset to the database query to get the required results. Finally, we use the create_links function to create the appropriate HTML markup for the pagination links. In conclusion, PHP pagination is an essential technique for managing large data sets on websites. Developers can use various package libraries like CodeIgniter, Laravel Pagination, and Bootstrap Paginator to implement pagination in their web applications quickly.