is there any way that i can convert a php statement into a function call
example:
Code: Select all
"level".$_GET['level'].($tag,$position);
level1($tag,$position)
i've tried to use eval but i didn't work
Moderator: General Moderators
Code: Select all
"level".$_GET['level'].($tag,$position);
Code: Select all
<?php
function dynFunc($arg) {
return $arg . ' was passed';
}
$var = 'dynFunc';
$str = 'This is a string';
echo $var($str);
// Result: This is a string was passed
?>