fork download
  1. <?php
  2. $a=[1,2,3,4];
  3. $b=[10,20,30,40];
  4.  
  5. $arr='a';
  6. print_r($$arr);
  7. $arr='b';
  8. print_r($$arr);
  9. $n=$$arr;
  10.  
  11. echo "----\n{$n[2]}\n";
  12. // your code goes here
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    [3] => 4
)
Array
(
    [0] => 10
    [1] => 20
    [2] => 30
    [3] => 40
)
----
30