How to convert this* string:
$arrKeys = ['lev1', 'lev2', 'lev3'];
$val = 'foo';
In to the following array:
Array
(
[lev1] => Array
(
[lev2] => Array
(
[lev3] => foo
)
)
)
*Number of array keys may vary. Each array key except the last one represents Array.
Thank you!