![]() |
Include PHP code in variable pass to template, is it possible? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Include PHP code in variable pass to template, is it possible? (/showthread.php?tid=17720) |
Include PHP code in variable pass to template, is it possible? - El Forum - 04-13-2009 [eluser]RJ[/eluser] Hello, I've built a custom form that will display the fields based on a config file. Using CI's form validation I need to include Code: <?= $this->lang->line('.$key.') ?> Code: $templ[$key] = ' <div class="oneField"> Include PHP code in variable pass to template, is it possible? - El Forum - 04-13-2009 [eluser]kgill[/eluser] You aren't going to be able to pass code in a variable, but you shouldn't need to. Is there some reason I'm missing that is preventing you from sending the value that $this->lang->line produces instead of the code? Code: $templ[$key] = ' <div class="oneField"> Include PHP code in variable pass to template, is it possible? - El Forum - 04-13-2009 [eluser]RJ[/eluser] Nope, you are absolutely correct. I was thinking to much! ![]() Thanks @kgill |