Posted by Daniel Kempkens on 06/15/07 19:32
Ciaran schrieb:
> Can someone please give me a hand with this?
>
> $arr=array(2,4,5,6);
>
> $test='arr';
>
> echo (eval("$".$test."[0]"));
>
> I'm trying to get it to echo 2
>
> Thanks a lot,
> Ciarán
>
Without trying it, this should work:
eval("echo $".$test."['0'];");
[Back to original message]
|