[eluser]Majd Taby[/eluser]
UnrealMinds - the reason that doesn't work is because <?=anchor('foo','bar'); ?> is equivalent to <?php echo anchor('foo','bar'); ?>. So two things, first of all, when you're in php code (within <?php and ?>

, you don't use those tags, anything inside them is interpreted as php code. Also, anchor() returns the html, so you don't want to echo it out in the controller, instead you want to assign it, that's why you don't see echo in mironcho's code.