aximbigfan Posted March 8, 2008 Share Posted March 8, 2008 Would it be possible to parse PHP code in a var? For example: $var = "$var1 = 0;"; function test() { <parse $var> echo $var1; Thanks, Chris Quote Link to comment https://forums.phpfreaks.com/topic/95023-parse-code-in-a-var/ Share on other sites More sharing options...
laffin Posted March 8, 2008 Share Posted March 8, 2008 <parse $var> = eval($var); Quote Link to comment https://forums.phpfreaks.com/topic/95023-parse-code-in-a-var/#findComment-486738 Share on other sites More sharing options...
aximbigfan Posted March 8, 2008 Author Share Posted March 8, 2008 THANKS!!!!!!! This does _exactly_ what I want to do!!! Thanks again!! You have really helped me out with this one!!! Chris Quote Link to comment https://forums.phpfreaks.com/topic/95023-parse-code-in-a-var/#findComment-486743 Share on other sites More sharing options...
laffin Posted March 8, 2008 Share Posted March 8, 2008 Anytime Good luck in yer coding Quote Link to comment https://forums.phpfreaks.com/topic/95023-parse-code-in-a-var/#findComment-486775 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.