<?php$a=[1,2,3,4];$b=[10,20,30,40]; $arr='a';print_r($$arr);$arr='b';print_r($$arr);$n=$$arr; echo "----\n{$n[2]}\n";// your code goes here
Standard input is empty
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) Array ( [0] => 10 [1] => 20 [2] => 30 [3] => 40 ) ---- 30
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!