I have declared a function "foo" within a class and I want to call it within the class via a variable function name like this:
$function_name = '$this->foo' ;
$function_name() ;
But this syntax gives the error:
Call to undefined function: $this->foo()
If I call the function $this->foo() directly it works fine.
Can someone please tell me how to define a string that will refer to a function within a class?
TIA.