I had a url http://localhost/tasty/index.php/admin/edititems?id=20. I have to get the value 20.
http://localhost/tasty/index.php/admin/edititems?id=20
20
You can do this:
$this->input->get('id', TRUE);
I'd recommend checking out the docs here: http://www.codeigniter.com/user_guide/libraries/input.html