[eluser]mjsilva[/eluser]
So, what is the best thing to do here, in ajax call from a view, should a use echo or $this->output->set_output() in controller to show the ajax response?
edit: added exit($return_this) to title, thanks to Phil Sturgeon
[eluser]Phil Sturgeon[/eluser]
Using the output class is only useful if you are building up output as you go via view/parse files and the sort or for handling caching with shared logic.
If you are certain you want nothing else to be output, simply exit($return_this); to output and stop CI/PHP in its tracks. Much quicker.