title: Array: set value using dot notation?
body: <p>Looking into Kohana documentation, i found <a href="http://kohanaframework.org/3.0/guide/api/Arr#path" rel="noreferrer">this really usefull function</a> that they use to get values from a multidimensional array using a dot notation, for example:</p>
  
  <pre><code>$foo = array('bar' =&gt; array('color' =&gt; 'green', 'size' =&gt; 'M'));
  $value = path($foo, 'bar.color', NULL , '.');
  // $value now is 'green'
  </code></pre>
  
  <p>Im wondering if there is a way to set the an array value in the same way:</p>
  
  <pre><code>set_value($foo, 'bar.color', 'black');
  </code></pre>
  
  <p>The only way i found to do that is re-building the array notation ($array['bar']['color']) and then set the value.. using <code>eval</code>.</p>
  
  <p>Any idea to avoid eval?</p>