I'm having a simple issue that I've been beating my head against the screen trying to figure out. I have a variable $sceneArray that holds the array listed below. I also have another variable $locateRecord that holds something like ['opening']['scene2'].
Ordinarily, to get the value of scene2, I would just reference $sceneArray['opening']['scene2']. But in this case, I need to combine the two variables to retrieve that value. I have tried things like ${sceneArray.$locateRecord} but that isn't work for me either.
Would appreciate any hint!
EDIT: I have the ability to format the $locateRecord value in a different way if that can solve this. For example, I could structure it as opening>scene2 or opening,scene2 etc.
Array
(
[opening] => Array
(
[scene1] => 1:00
[scene2] => 2:00
)
[closing] => Array
(
[scene3] => 3:00
[scene4] => 4:00
)
)
evalis the first thing that comes to mind. But there will be a bunch of people who don't like it. Can you afford, memory-wise, to build another data structure where['opening---scene2']is present?