got a multidimensional array and a string in a config and i need to transform it as an array key without the use of eval. Real world use of this problems is that i got a big document from mongodb that is transformed into multi dimensional array. However i need to define specific array nodes from a config file.
the idea is to create a config file as representation of the array key's hierarchy
on the config.ini the values below are some example.
colorattribute = attribute.color
wholesaleprice = prices.wholesale
Example Response from mongoDb
<?php
$products = array(
'product_name' => 'iTouch',
'brand_name' => 'Apple',
'attributes' => array ( 'color' => 'black',
'size' => '5 in'
),
'prices' => array(
'wholesale' => 135,
'retail' => 200,
),
);