I store a string in a database called “my_function”. So to access this string, I’m in scenario where I call:
$row->theFunction
Furthermore, I am in a class where this function is define, and can ONLY be called like so:
$this->my_function($param1, $param2);
Now, my problem is, I need to execute my_function, using this. This DOES NOT work:
call_user_func( '$this->'.$row->theFunction, $param1, $param2 );
What am I doing wrong?
1 Answer