Hi guys.
I want to call this generic echo function within a class, but have
trouble referencing the output function with $this-> .
Any suggestions? Maybe there is a better solution to this?
This is within a class:
[snip]
# generic WALK functions
function walkit($array)
{
array_walk($array,"$this->output"); //not
working
}
function output($item,$key)
{
echo "$key. $item<br />\n";
}
thomas
- Re: [PHP] reference a function in a class from array_wa... Thomas Hochstetter
- Re: [PHP] reference a function in a class from arr... David Otton
- Re: [PHP] reference a function in a class from arr... Leif K-Brooks

