note 40283 deleted from function.array-walk by aidan

From: Date: Sun, 11 Jul 2004 02:08:34 +0000
Subject: note 40283 deleted from function.array-walk by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73028@lists.php.net to get a copy of this message
Note Submitter: nospam0 AT massart DOT org ---- Martin Lucas-Smith is wrong, it's possible to call a static method using this syntax : <?php // the class with its method class testClass { function testMethod($string) { echo "array value = " . $string . "<br/>"; } } // creates the array $testArray = Array(); $testArray[]="test1"; $testArray[]="test2"; $testArray[]="test3"; // call the static class method for each array item array_walk( $testArray, array( testClass,'testMethod') ); ?>

« previous php.notes (#73028) next »