Hello
I am trying to put a variable into a variable but in the array key part. What I am trying to achieve would be simply something like this:
$array['stock_$variable']
where the variable inserted is $variable and actually makes up part of the array key.
Is this even possible?
I am aware that to place a variable within a variable I could use the following:
${"array_{$variable}"}['stock']
and this understanding leads me to believe that this should work:
${"array_['stock_{$variable}']"}
but it doesn't and I don't seem to be able to place the variable actually into the key.
I hope this makes sense. Thanks for any suggestions.