[eluser]adamp1[/eluser]
Right I have a controller (
admin/settings) and need to fetch the segment information. So I tried using $this->uri->segment(). Problem is I also have the following route
So I tried to construct the uri string using rsegment(). The reason I can't use uri_string() is becasue I don't need all the segments all the time.
Now a strange thing happens, If I am at
index.php/admin/settings and run the following code:
Code:
$this->CI->uri->slash_rsegment(1) .
$this->CI->uri->slash_rsegment(2) .
$this->CI->uri->slash_rsegment(3);
I only get this
settings/index// but if I run this code:
Code:
$this->CI->uri->slash_segment(1) .
$this->CI->uri->slash_rsegment(1) .
$this->CI->uri->slash_rsegment(2);
I get the result I want
admin/settings/index. I don't get why slash_rsegment and slash_segment seem to work differently.