Dat Posted May 14, 2008 Share Posted May 14, 2008 How can I execute php coding in a string. Because once I replace all variable within my template the string will contain: "<?php if($something) { echo $this; } ?> So after replacing all variables with values how can I execute the php codes in the string before printing the final result? Is there a php function for this, because i seem to find it on the php site. Quote Link to comment Share on other sites More sharing options...
p2grace Posted May 14, 2008 Share Posted May 14, 2008 eval() should do the trick http://www.php.net/manual/en/function.eval.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.