Loading a method using a string variable
How can i work with something like:
$parameter = "get_something()";
$value = $this->method->$parameter;
I'm getting the er开发者_如何学编程ror "undefined property $get_something()" (note the $).
Try to use
$name = "get_something";
$value = $this->method->$name();
instead
精彩评论