Assuming I have the following array
array(
'chave1' => 'valor1',
'chave2' => array(
'chave3' => 'valor2',
'chave4' => array(
'chave5' => 'valor3'
)
))
And in this array I need to set the value of key 5, but without going level by level, I could move to a function like this:
setar_valor('chave2.chave4.chave5', 'meu novo valor');
And this function would interpret that every .
would be a new level within the array.
I've already broken my mind about it, but I can not think how to do it: /