I am having trouble looping through an array which is referenced as a variable variable.
when trying to print the value of an array element using:
print $$specialization_code[$i];
I get an undefined variable warning. But when I try to print the value of the array hard coding the name of the array, I get the value.
print $K[$i]; <-- This works, but the previous statement does not.
I can also print all the values of the array using:
print_r(array_values($$specialization_code));
But I don't know how to store the results in a variable.
Any suggestions? Perhaps an explanation of why variable variable arrays do now work like normal arrays...?