Drezard Posted June 18, 2007 Share Posted June 18, 2007 Okay, so I want to set PHP inside a variable. So something like: $code = "<?php echo 'my site'; ?>"; but that doesn't seem to work. What can I do to put a php code inside a variable? Regards, Daniel Quote Link to comment Share on other sites More sharing options...
Grego Posted June 18, 2007 Share Posted June 18, 2007 ...that should work. What "doesn't work" about it? Does it bring up an error message? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted June 18, 2007 Share Posted June 18, 2007 you don't need the <?php tags to do this. have a look at eval - http://uk3.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.