I have a variable like $string = \"blah\";
$string = \"blah\";
How can I create a function that has the variable value as name? Is this possible in PHP?
Like
this might not be a good idea, but you can do something like this:
$string = "blah"; $args = "args" $string = 'function ' . $string . "({$args}) { ... }"; eval($string);