CodeIgniter URI segments captured as variables?
- by Zen Savona
well, i have a function within a controller called test, and i can access it by going to http://localhost/nwk/control/test
this is my function. I want to use the data given in the next segment from the "test" as a php variable.
so if i put
function test()
{
$var $this->uri->segment(3);
echo $var;
}
according to the user guide if I enter control/test/data, my variable should be equal to 'data'?
doesn't seem to be working.
Am I missing something here?