note 7779 deleted from language.variables.variable by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 18:54:57 +0000 |
| Subject: | note 7779 deleted from language.variables.variable by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25203@lists.php.net to get a copy of this message | ||
here's a workaround which i've found useful when trying to assign values to variable
variables within functions, (which, needless to say, seems to be buggy)
function altervar() { #sets $bob[1]='whatever';
$var='bob';
global $$var;
$temp=$$var;
$temp[1]='whatever';
$$var=$temp;
}
if you try to alter $$var[1] directly it doesn't work, even though it's globaled.