I have an array (which will be dynamically populated) called $currentTree
Now I want to use this array to iterate over and another array called $tree
So, for example
$currentTree = array(5, 6, 2, 8);
becomes
$tree[5][6][2][8] = "hello world"; //the values of $currentTree is used to get the appropriate child node of array $tree
Is there any predefined PHP function I can use to achieve this?