PHP manual doesn't cover use of variable-variable array indexes too thoroughly, but comments do mention that they don't work just as you have found out.
Some workarounds are provided, though:
$array[1][1]['test']="hello world"
$var1="array";
$var2="[1][1]";
$var3="['test']";
$tmp=$var1.$var2.$var3;
eval('echo $'.$tmp.';');
Above results in expected 'hello world' output. That said, I'd steer away from using eval() in any code.
Comment (by nick at customdesigns dot ca, dated 2006) on the manual page also provides function that can handle variable arrays with indexes, though.
echo eval("return \$$var1$var2$var3;"). I would strongly advise against it, however.eval()eventually. Please read the CAUTION on the manual page before even thinking about using it. I bet if you stood back and looked at your requrement you could come up with something that worked without usingeval()eval()is kind of a likegoto. It does great deal of damage when you don't know what you are doing and when you know enough to use it, you know you don't really need it.