Re: variable variable function calling
| From: | Hojtsy Gabor | Date: | Thu, 19 Apr 2001 14:47:36 +0000 |
| Subject: | Re: variable variable function calling | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-560@lists.php.net to get a copy of this message | ||
> Someone clue me in before I go crazy :-) What is the syntax for calling
> a variable function name with arguments? This doesn't work:
>
> $funcname = "get_db_stuff";
>
> ${$funcname}($resource_name,$template_source,$template_timestamp);
>
> <b>Fatal error</b>: Call to undefined function: () ...
Simpler:
$funcname($resource_name,$template_source,$template_timestamp);
Your one means:
$get_db_stuff($resource_name,$template_source,$template_timestamp);
But the $get_db_stuff scalar is empty I guess :)
Goba
........................................................... . . . . .
Editor of the Hungarian PHP manual, Admin of the Hungarian PHP mirror