I have the 'path' to an array value stored in a variable, and I am trying to set the value. What I am trying to do is this:
$array['Breaks'][1]['In'] = "XXX";
However, I have ['Breaks'][1]['In'] stored in a variable. So I am essentially trying to do something like this:
$path = "['Breaks'][1]['In']";
$array.$path = "XXX";
This doesn't work though, and I'm not exactly sure how to go about making this work correctly.
Any suggestions?
$pathand then cycle through the parsed values to set the value.['Breaks'][1]['In']in a variable? Related: meta.stackexchange.com/questions/66377/what-is-the-xy-problem['Breaks'][1]['In']in a variable again?