ID: 9552 Updated by: andrei Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Arrays related Assigned To: Comments: It is possible to call object methods with array_walk(). Try the following: array_walk($this->files, array($this, "memberfunc_2")); Previous Comments: --------------------------------------------------------------------------- [2001-03-04 19:18:06] [EMAIL PROTECTED] Well maybe noone will ever use array_walk in Classes, but this should at least be documented: _________SCRIPT_____________ class foo { var $files = array(); // CONSTRUCTOR function foo() { // fill up the files array $this->files = $this->memberfunc_1(); // do something with the array array_walk($this->files, "$this->memberfunc_2"); // or "memberfunc_2" or "this->memberfunc_2" } // create a unique filename and clean up the real filename function memberfunc_2(&$c_arr) { // do some stuff .... } } // end class $bar = new foo(); ____________END SCRIPT______________ This code leads to an Error Like : Warning: Unable to call this->memberfunc_2() - function does not exist in ..... --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9552&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]