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

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)

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

And i always have this ERROR:

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.

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

Thank you! it works!
i`m so n00b


Dude, put a (NSFW) warning in your signature link.

Theme © iAndrew 2016 - Forum software by © MyBB