Dang lack of a list reply button
| From: | Nathan Hawks | Date: | Fri, 19 Oct 2007 18:22:41 +0000 |
| Subject: | Dang lack of a list reply button | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263408@lists.php.net to get a copy of this message | ||
I have only done this when I am building the function name using a
string expression, so my advice might not be necessary in your case but
it has worked for me:
{$function}($var);
In that case, the curly braces equate to the eval() function in
Javascript.
Jay Blanchard wrote:
> I don't think you can put a function name in a variable and call it
like
> $function($var).
Yes you can - it's basically the same as variable variables.
-Stut