Re: passing second function through a function

From: Date: Mon, 17 Nov 2003 21:12:41 +0000
Subject: Re: passing second function through a function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170013@lists.php.net to get a copy of this message
function call_some_function($function,$args=NULL) { eval("$function($args)"); // Or something like that.. $function(); // also works I think.. } -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ########################## Please, if you are using windows, you may be infected by Swen. Please go here to find out more: http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen http://securityresponse.symantec.com/avcenter/venc/data/w32.swen.a@mm.html ########################## "Ian Truelsen" <ian@ihtruelsen.dyndns.org> skrev i meddelandet news:20031117110447.6597af4c.ian@ihtruelsen.dyndns.org... > What I want to do is to call a function from within a function, but pass > the secondary function name through the first function. Like this: > > function1(function2) > > Then call function2 from within function1. Unfortunately, I have been > unable to figure out the proper syntax for calling the second function. > > Does anyone know if this is possible and what the proper syntax would be > for calling a function from a variable name? > > -- > Ian Truelsen > Email: ian@ihtruelsen.dyndns.org > AIM: ihtruelsen > Homepage: http://www.ihtruelsen.dyndns.org

« previous php.general (#170013) next »