note 100700 deleted from function.call-user-func by danbrown

From: Date: Mon, 01 Nov 2010 12:33:48 +0000
Subject: note 100700 deleted from function.call-user-func by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173641@lists.php.net to get a copy of this message
Note Submitter: can dot acar at windowslive dot com ---- function modul_register($where, $function) { global $modul; $modul[$where][$function] = array('function' => $function); return; } function modul_add($where, $function) { return modul_register($where, $function); } function modul_action($tag) { global $modul; if (!isset($modul[$tag])) { return; } foreach ((array )$modul[$tag] as $the_) { call_user_func($the_['function'], $tag); } } //////////////////////// function Test() { echo "Test function called"; } modul_add("template.foo","Test"); ///////////////// modul_action("template.foo");

« previous php.notes (#173641) next »