uri->segment returning false |
[eluser]Unknown[/eluser]
Hi My controller name is "Events" and i have a function "viewdetails" inside it . Now the problem is when i used $this->uri->segment(3) it return empty value. any have a solution . here is my code: link: http://localhost/myprj/index.php/events/viewdetails/2 if i am not wrong it ($this->uri->segment(3) ) should return 2 but it returns empty value. plz help Thanks
[eluser]Met[/eluser]
you have ommited your code the following works: Code: <?php URL - index.php/events/viewdetails/2 outputs 2. note the "echo" - unless you are assigning the value to a variable, calling just $this->uri->segment(3) will not output anything on its own.
[eluser]danmontgomery[/eluser]
or... Code: class Events extends Controller { |
Welcome Guest, Not a member yet? Register Sign In |