I have a pretty simple problem, but for now, I can't seem to wrap my head around it.
I have a 1D array, for example:
$array = array("file", "video", "url")
And I want to convert it to:
$array["file"]["video"]["url"] = array();
Now, I won't know in advance how many elements I will have in my first array so I cannot make any assumptions. Also, I cannot use a tree structure for this particular problem, it needs to be an array.