Friday, 27 September 2013

Call a php function with a name that's partially a variable

Call a php function with a name that's partially a variable

I'd like to ask you a simple question,
I have a class with functions called:
somethingModule()
someotherthingModule()
otherthingsModule()
How can I call these functions based on a pattern? I mean something like:
$call = $class->{$modulename}Module($params);

No comments:

Post a Comment