I have an array which contains the path to a specific value from an other array, to make it a bit more clear, here is an exemple.
My array containing the keys which I'll call $params
Array
(
[0] => paths
[1] => assets
[2] => js
)
And here is my associative array which I'll call $config
Array
(
[paths] => Array
(
[assets] => Array
(
[js] => /assets/js
[css] => /assets/css
)
)
[library] => Array
(
[js] => jQuery
)
)
So how could I use my array 1 to access the value in my array 2?
I tried $config[$params[0]][$params[1]][$params[2]], but it's not efficient at all.