[eluser]Luke D.[/eluser]
Hi all
I'm new to Codeigniter but not to php, esp. php5. Whatever. I've got my codeigniter system all set up brand new with practically no changes - nothing significant, and am working on a tiny little project. I want to build a class in the library that will make a navigation menu. I'm using the url helper. Here is the code - I pulled all the complex stuff out of it, and this won't work It is in the application library folder. Problem is it isn't correctly loading the url helper I think. Any ideas? This is making me feel retarded.
Luke
class Menumaker {
function Menumaker()
{
$obj =& get_instance();
$obj->load->helper('url');
/********************************
this didn't work either:
$this->load->helper('url');
********************************/
}
function make_menu($thing, $thing2)
{
return anchor($thing, $thing2);
/********************************
this didn't work either:
return $obj->anchor($thing, $thing2);
********************************/
}
}
$test = new Menumaker();
echo $test->make_menu('please', 'work');