MasterACE14 Posted June 16, 2007 Share Posted June 16, 2007 is it possible to put if, if else and else statements in a variable? example: <?php $statement = 'if(1 = 1) { echo("1 does equal 1"); }'; ?> Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/55804-solved-statements-in-variables/ Share on other sites More sharing options...
emehrkay Posted June 16, 2007 Share Posted June 16, 2007 can you give a better example of what you're tyring to do? i feel that this is nto it Quote Link to comment https://forums.phpfreaks.com/topic/55804-solved-statements-in-variables/#findComment-275649 Share on other sites More sharing options...
MasterACE14 Posted June 16, 2007 Author Share Posted June 16, 2007 I'm not trying to do anything lol, I'm just wondering if this is possible? Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/55804-solved-statements-in-variables/#findComment-275655 Share on other sites More sharing options...
emehrkay Posted June 16, 2007 Share Posted June 16, 2007 well its possible, you just have to use eval. but i asked because there may be a better alternative Quote Link to comment https://forums.phpfreaks.com/topic/55804-solved-statements-in-variables/#findComment-275666 Share on other sites More sharing options...
MasterACE14 Posted June 16, 2007 Author Share Posted June 16, 2007 hmm ok, Thanks. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/55804-solved-statements-in-variables/#findComment-275667 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.