Jump to content

String to PHP Function


eleljrk

Recommended Posts

The question is simple, but the answer seems impossible.

I've been trying everything, but now I have to ask the experts.. :P

 

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! :)

Link to comment
https://forums.phpfreaks.com/topic/207308-string-to-php-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.