title: How to runtime make a multidimensional array from a string.
body: <p>Having a generic string $a and exploding it for dot es:</p>
  
  <pre><code>$b = explode(".", $a)
  </code></pre>
  
  <p>How i can to Runtime code it dinamically without to know <code>count($b)</code> value:</p>
  
  <pre><code>if (count($b) == 1) {
      $c[$b[0]] = $var;
  } elseif (count($b) == 2) {
      $c[$b[0]][$b[1]] = $var;
  } elseif (count($b) == 3) {
      $c[$b[0]][$b[1]][$b[2]] = $var;
  } ... {
      ...
  } elseif (count($b) == n-1) {
      $c[$b[0]][$b[1]][$b[2]]...[$b[n-2]] = $var;
  } elseif (count($b) == n) {
       $c[$b[0]][$b[1]][$b[2]]...[$b[n-1]] = $var;
  } else {
       $c = $var;
  }
  </code></pre>
  
  <p>It is a pseudocode ofcourse for give an idea about what i mean.</p>