<?
function a() {
return "a";
}
function b($val) { echo $val."b"; } b(a()); ?>
or you can always use classes...
On Fri, 11 Jun 2004 10:25:54 -0400, Bob Lockie <[EMAIL PROTECTED]> wrote:
I want to pass a function as a parameter and execute it in another function.
A callback. :-)
For example:
function a() { echo "a"; }
function b( $func ) { func(); echo "b"; }
The output of "b( a )" will be "ab".
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php