For example user give me an array like this :
$input = ['countries', 'cities', 'towns'];
I want to create an array like this, i know what right side is :
$output["countries"]["cities"]["towns"] = "Downtown";
another example :
$input = ['cities', '0'];
$output["cities"][0] = "Nice";
I want to create a key / value array using the key given to me as a key.
I do not know the length of the array given to me.