I am having trouble calling a class method from a string in PHP. Here\'s a simple example. Once I get this working I\'ll be using a variable as the method n
Try this:
$tags_array = call_user_func(array($yourClassObj, 'get_images_for_tag'), $row["id"]);
When you want to call a method on an object with call_user_func() you have to pass it an array with the first element as the object or class name that the method will be called on and the second element being the name of the method, e.g.:
$tags_array = call_user_func( array($this,'get_images_for_tag'), $row["id"]);
Use this :
call_user_method('get_images_for_tag',$this,$row["id"]);