Assigning values to associative array with dynamic keys
<p>I have <code>$options</code> as an associative array with each value as mixed(can be strings, or other arrays). I won't have any objects there.<br>
<code>$keys</code> is a numeric array &amp; the number of keys is determined at runtime.</p>

<p>I want to have a result similar to this expression<br>
<code>$options[$keys[0]][$keys[1]].......[$keys[count($keys)-1]] = $value;</code></p>

<p>For example, if <code>$keys = array('key1')</code>, i want to do<br>
<code>$options['key1'] = $value;</code><br>
&amp; if <code>$keys = array('key1', 'key2')</code>, i want to do<br>
<code>$options['key1']['key2'] = $value;</code>
&amp; so on</p>

<p>The problem with array_replace_recursive is that $value may itself be an array. Someway to constrain the depth to which array_replace_recursive can go? or maybe some other way?</p>
