eleljrk Posted July 9, 2010 Share Posted July 9, 2010 The question is simple, but the answer seems impossible. I've been trying everything, but now I have to ask the experts.. Here is the problem: global $_HEY; $things = array($_HEY, "again, hey", ".. ..", "more..", "etc"); foreach($things as $thing) { $count++; $variable = $count.": ".$thing."<br />"; } unset($count); unset($thing); $variable = strtoupper($variable); return $variable; Now, that is simple enough. Then everything is upside down when you read this: - All the basic PHP above is inside a string. Then I ask you for the answer: - How can I get this PHP out from the string and run it as a function..? That's the golden one! Quote Link to comment Share on other sites More sharing options...
eleljrk Posted July 10, 2010 Author Share Posted July 10, 2010 I have to commit that I just found a function called "create_function". Would this do what I need, can someone confirm? Quote Link to comment Share on other sites More sharing options...
joel24 Posted July 10, 2010 Share Posted July 10, 2010 http://php.net/manual/en/function.exec.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.