Online Shopping : Computers : Programming : Languages : PHP : kms : Classes

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 28 people (61%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do I call a class method from array_walk? e.g. array_walk( fruits, "$this->print_array" ); - does not work.

Dec 20th, 2001 07:00
Dan Zambonini, Hans Kuhlen, Tim Squires,


$this->"print_array" does the job...

DZ: Or, a better method:

array_walk($fruits, array($this, 'print_array'));