I have the following array:
array('data' => array('one' => 'first', 'two' => 'second'));
How i can get the value of key 'one' using string:
echo __('data.one');
function __($key) {
$parts = explode('.', $key);
$array = array('data' => array('one' => 'first', 'two' => 'second'));
return ???;
}
Thank u!
question from:https://stackoverflow.com/questions/65924493/access-array-value-using-index-variable-that-contains-brackets