Posted by Yorn de Jong on 02/10/05 23:17
WFX wrote:
> Hi all !
>
> I've declared variables like this :
>
> $buttons[1]["name"] = "Test";
>
> And now, for some reasons, I want to access to this value
> dynamically throught variable variable.
>
> Example :
>
> $var_name = "buttons";
> $var_index1 = 1;
> $var_index2 = "name";
> echo ${$var_name}[$var_index1][$varindex2];
>
> Doesn't display anything ... instead of "Test".
>
> Can someone help me ?
I would try this:
echo $$var_name[$var_index1][$var_index2];
Navigation:
[Reply to this message]
|