0
Guys I made the pagination in codeigniter and it works with the exception of a detail the link of page two is url/1, page three is url/2 and the first only url. What do I do to leave page two with/2 url? Follow the code:
$config = array();
$config["base_url"] = base_url() . "usuarios";
$config["total_rows"] = $this->usuario->totalRegistros();
$config["per_page"] = $this->config->item('registros_por_pagina');
$config["uri_segment"] = 2;
$this->pagination->initialize($config);
$pagina = ($this->uri->segment(2)) ? $this->uri->segment(2) : 0;
$data['usuarios'] = $this->usuario->listarUsuarios($config["per_page"], $pagina);
$data["paginacao"] = $this->pagination->create_links();
Thank you