Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $segment = $this->uri->segment(2); //obter o segmento
- preg_match("/#([0-9]*)/", $segment, $matches); //isolar o id
- $id = !empty($matches[1]) ? (int) $matches[1] : null; // verificar se este existe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement