Codeigniter url segments
Codeigniter request uri
Codeigniter Uri Segments Can be Retrived by using the
$this->uri->segment(n);
For Example
www.demoexample.com/user/register/66
$this->uri->segment(1); – Will Return Controller name “user” from the url.
$this->uri->segment(2); – Will Return Method name (ie. Action) “register” from the url.
$this->uri->segment(3); – Will Return Parameter name (ie. Segment) “66” from the url which is recived in method
register.
Advertisements