Everybody knows that you can access a variable in PHP using this: ${\'varName\'}. But when you need to get/set a variable witch is part of an array, why doesn\'t it work ? Suppo
I recommend you not to use dynamic variables like ${$var}.
What you want is modifying a multi-dimensional associative array according to a path of keys.
This is a procedural example to keep it simple. You may want to put your hierarchical array and this functions inside a class.