RE: [PHP] Calling functions which names are inside a variable

2007-08-26 Thread Sanjeev N
I tested this functionality. This is working fine. foo.php ? function foo( $var ){ include $var.'.php'; return $var(); }; foo(somefunction); ? somefunction.php ? function somefunction(){ echo hello; } ? Out put is hello. You make sure that your both

Re: [PHP] Calling functions which names are inside a variable

2007-08-26 Thread Richard Lynch
On Sun, August 26, 2007 12:46 am, Robert Keizer wrote: I am currently working on a module testing class, I can't seem to find the correct syntax. Here is an example of the problem: function foo( $var ){ include $var.'.php'; return $var(); // !--- problem Try this: return

Re: [PHP] Calling functions which names are inside a variable

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 23:46 -0600, Robert Keizer wrote: I am currently working on a module testing class, I can't seem to find the correct syntax. Here is an example of the problem: function foo( $var ){ include $var.'.php'; return $var(); // !--- problem };