I have a php class which has a load of functions in it.
so I start with
$name= new classname();
$name -> callFunction("a,b,c");
Then in the class we explode a, b, c to create an array ("a", "b", "c")
then do a foreach loop with something like this in it
if ($element == "a")
{
$this -> a();
}
if ($element == "b")
{
$this -> b();
}
if ($element == "c")
{
$this -> c();
}
etc.
This all works fine - but is there a more eloquent way using dynamic function names?
I'm sure there is but can't get it right. Any ideas?
I want to have
$name= new classname();
$name -> callFunction("a", "b", "c");
then in the class
$this -> a();
$this -> b();
$this -> c();
thanks
Jules