I'm trying to display a lump of HTML text by a template variable and it seems to not be processing the PHP. I currently use this in my view (this is codeigniter)
<?php dump($_SESSION); echo (isset($html) && !empty($html)) ? $html : show_404(); ?>
The HTML includes a couple locations with php tags and I'd like those to get loaded when the page is echo'd. Is there a way to do this?
The main reason I need it to work from the HTML variable I pass in is because this is part of a page creator and I need to be able to plop php conditions in there that aren't in every page.
$htmlvariable is a string which contains<?php ...code, and you want that code to be executed?eval()something, which means you probably have something more fundamentally wrong with your design.eval() === √evil- do not do it!isset($var) && !empty($var)→!empty($var)- you don't need the redundantissetthere.