I'm going to try to make this as simple as possible.
A dot notation string gets sent to a function, so for example, this would be the string.
'user.id'
Then I explode the dot to give me an array of names
$dotNotation = explode(".", $variable);
And now I need to use these names to select from another variable like so
$row[$dotNotation[0]][$dotNotation[1]]
So this would be
$row['user']['id']
However, I need it to be dynamic, it can be any depth i.e there can be any number of dots. I'm totally stuck on how to achieve this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…