Question: Variable variables and variable functions work great, but how can
you execute arbitrary code statements using php code stored inside
variables?

// Example

function stuff() {
        echo '<p>Stuff</p>';
} // end stuff()

$function = 'stuff';
$function(); // works

/* 
Given the above, I would like and had expected the below to be interpreted
by the parser and executed as if it were regular static php code.
*/

// Should interpret: stuff();
$lucid = "stuff()";
$lucid; // doesn't work, but doesn't show an error 

// Should interpret: if (1) { echo $function; }
$lucid = "if (1) { echo $function; }";
$lucid; // doesn't work, but doesn't show an error 


Thanks for any help,


Henning Sittler
www.inscriber.com

Reply via email to