Skip to content
Advertisement

Tag: callback

How do I use a class method as a callback function?

If I use array_walk inside a class function to call another function of the same class It gives me the following error – Warning: array_walk() [function.array-walk]: Unable to call test_print() – function does not exist in … So, how do I specify $this->test_print() while using array_walk()? Answer If you want to specify a class method as a callback, you need

Advertisement