Welcome Guest, Not a member yet? Register   Sign In
url helper problem
#1

[eluser]blackgoo[/eluser]
that is what i do:

1) i load "url" helper in one of my controller files. the controller file loads data to the view file (dummy.php).
2) then,i want to display the first segment of the URL in the view file (dummy.php)

Code:
<?php echo $this->$uri->segment(1); ?>

And i always have this ERROR:

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: uri

Filename: views/dummy.php

Line Number: 22

please, explain what should i do to solve this
Thank you.
#2

[eluser]pistolPete[/eluser]
Use this:
Code:
<?php echo $this->uri->segment(1); ?>
#3

[eluser]blackgoo[/eluser]
Thank you! it works!
i`m so n00b
#4

[eluser]jmadsen[/eluser]
nevermind
#5

[eluser]mattpointblank[/eluser]
Dude, put a (NSFW) warning in your signature link.




Theme © iAndrew 2016 - Forum software by © MyBB