![]() |
Trouble with view_cell - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Trouble with view_cell (/showthread.php?tid=79175) |
Trouble with view_cell - Zeff - 05-05-2021 Hi folks, I tried to use the view_cell() function in a view file, but I always get an error: Code: TypeError Code: <div class="heroe"> The TestController.php (which has no constructor!) has a simple method: Code: public function bar() Many thanks for the golden tip! ![]() RE: Trouble with view_cell - iRedds - 05-05-2021 echo returns nothing. Your method must return a string. return 'BAR'; instead of echo 'BAR'; RE: Trouble with view_cell - Zeff - 05-06-2021 Hello iRedds, Thanks so much for your hint, it worked by returning a string. I was so used to echo views from the previous tutorials I followed and I missed this perticular difference... You made my day! ![]() Zeff |