array_walk的问题

在php4中定义了一个类
class xxx
{
var xxx;
var xxx;

function a
{
array_walk ($this -> xxx, 'b');
}

function b ($value, $key)
{
xxx
}
}

现在就是array_walk这个callback函数的名字应该咋写啊?我写'b'或者'$this -> b'都说不行...

:(
---------------------------------------------------------------

写成:
array_walk ($this -> xxx, array($this,'b'));

Published At
Categories with Web编程
comments powered by Disqus