Re: [PHP-PEAR] indirect function call
[email protected] (John Donagher)
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
Try the following last 3 lines instead:
$foo = new bdd;
$bar = "bdd_function";
$foo->$bar("foo bar !");
On Wed, 14 Feb 2001, Burak DAYIOGLU wrote:
> Hi,
> We are having a little problem with indirect function calls as being
> discussed on the list for a while... The below thingie does not work,
> does anybody have any idea to make it run?
>
> regards,
> -bd
>
> <?php
>
> class bdd
> {
> var $bdd_var;
> function bdd_function($input)
> {
> echo "This is bdd_function speaking and the input is :
> $input";
> }
> }
>
> $foo = new bdd;
> $bar = $foo->bdd_function;
> $bar("foo bar !");
> ?>
>
>
--
John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com
Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD