note 18458 added to language.variables.variable
| From: | mlong at mlong dot org | Date: | Wed, 23 Jan 2002 19:12:37 +0000 |
| Subject: | note 18458 added to language.variables.variable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-25753@lists.php.net to get a copy of this message | ||
Based on the comments here I was trying to do:
<p>$retarray=${$funcvar($var1,$var2)};
<p>That executed the function named in $funcvar and passed the arguments but I never got any
return value.
<p>What will work is this:
<p>$retarray=$funcvar($var1,$var2);
<p>This is because of the variable function feature which means if you add () to a variable
name it will treat the value of the variable as the function name.
--
http://www.php.net/manual/en/language.variables.variable.php
http://master.php.net/manage/user-notes.php?action=edit+18458
http://master.php.net/manage/user-notes.php?action=delete+18458
http://master.php.net/manage/user-notes.php?action=reject+18458