Calling php methods with strings

alexisg_2007

New Member
I have two objects. Object A and B.A has a method which returns B. And I want to call this dynamically so I use a string for calling a method inside of B like so:\[code\]$method = 'getB()->someMethod';\[/code\]But if do this:\[code\]$a = new A();$a->$method();\[/code\]It doesn't work. Any ideas?
 
Back
Top