A question asked from time to time in the IRC channel is: “How can I use helper X in my controller?”.

Well, helpers are not thought to be used in controllers. They are designed to be used in views. So whenever this question arises, you have to ask yourself (or others) whether you are doing something wrong and if there is no better solution.

Nonetheless, in some (rare) cases it can be useful to use a helper inside a controller to avoid code duplication. It can be accomplished in the following way:

class UsersController extends AppController {
    function index() {
        loadHelper('Html');
        $html = new HtmlHelper();
        debug($html->link('Cake!', 'http://cakephp.org'));
    }
}

Update 2007-08-13: m3nt0r has published a helper component in his blog which allows you to use a helper like a component. The article is in German, but the code should be self-explanatory.