title: PHP - dynamically add dimensions to array
body: <p>I have a :</p>
  
  <pre><code>$value = "val";
  </code></pre>
  
  <p>I also have an array :</p>
  
  <pre><code>$keys = ['key1', 'key2', 'key3'...]
  </code></pre>
  
  <p>The keys in that array are dynamically generated, and can go from 2 to 10 or more entries.</p>
  
  <p>My goal is getting this :</p>
  
  <pre><code>$array['key1']['key2']['key3']... = $value;
  </code></pre>
  
  <p>How can I do that ?</p>
  
  <p>Thanks</p>