This question already has an answer here:
- Can I use a variable to call a method? 3 answers
How to access the PHP function of a class where the function is stored in variable?
For example:
$functionname = "say_hello";
$obj = new Class();
$obj -> $functionname();
</div>