I want to be able to pass a string ("['parent_array']['child_array']") to a function that then pulls this string and "my_array" to the front of it and then creates a variable variable.
Then inside the function i do print_r($$string) and nothing comes out. See the code below for a better explanation.
// DOES NOT WORK
$string1 = "my_array['parent_array']['child_array']";
print_r($$string1); //prints nothing.
// WORKS
$string2 = "test";
$test = "This will be printed!";
print_r($$string2); //prints "This will be printed!
// WORKS
print_r($my_array['parent_array']['child_array']);