![]() |
yield implementation in codeigniter template engine - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: yield implementation in codeigniter template engine (/showthread.php?tid=62328) |
yield implementation in codeigniter template engine - vindenial - 07-02-2015 Hello, Recently i have newly setup the "yiled" for templating in layout of codeigniter using hook. But i am facing the below error when i set the "yiled" variable in my view. Quote:(Fatal error: The "yield" expression can only be used inside a function in /views/layouts/default.php on line 48) if u have any solution for same then reply me as soon as possible. RE: yield implementation in codeigniter template engine - mwhitney - 07-06-2015 http://php.net/manual/en/language.generators.syntax.php#control-structures.yield yield is a keyword in PHP 5.5+. It was used by some template libraries as a method/property prior to PHP 5.5, but most of those which are still maintained have been updated to remove the use of yield to avoid this conflict. |