title: Unable to create two-dimensional array from a dynamic string
body: <p>I am trying to load a dynamic string to an existing empty array(to create an array of array). The dynamic string looks like this (one, two, or more arrays of number separated by comma)</p>
  
  <pre><code>$str = "[52,18,140,41,56],[54,18,145,43,58]";
  </code></pre>
  
  <p>and loading it to an empty array in</p>
  
  <pre><code>$arr = explode(',', $str);  
  </code></pre>
  
  <p>It looks like I am loading the data to array as the <code>print_r($arr);</code> is printing </p>
  
  <pre><code>Array ( 
      [0] =&gt; [52 
      [1] =&gt; 18 
      [2] =&gt; 140 
      [3] =&gt; 41 
      [4] =&gt; 56] 
      [5] =&gt; [54 
      [6] =&gt; 18 
      [7] =&gt; 145 
      [8] =&gt; 43 
      [9] =&gt; 58] 
  )
  </code></pre>
  
  <p>but when I try to access them through <code>foreach ($arr as list($a, $b, $c, $d, $e)</code> I am not getting any thing </p>
  
  <pre><code>$arr = [];
  $str = "[52,18,140,41,56],[54,18,145,43,58]";
  $arr = explode(',', $str);
  
  print_r($arr);
  
  echo '&lt;table style="width:40%"&gt;';
  foreach ($arr as list($a, $b, $c, $d, $e)) {
       echo '&lt;tr&gt;';
       echo '&lt;th&gt;'.$a.'&lt;/th&gt;';
       echo '&lt;th&gt;'.$b.'&lt;/th&gt;';
       echo '&lt;th&gt;'.$c.'&lt;/th&gt;';
       echo '&lt;th&gt;'.$d.'&lt;/th&gt;';
       echo '&lt;th&gt;'.$e.'&lt;/th&gt;';
       echo '&lt;/tr&gt;';  
  }
  echo '&lt;/table&gt;';
  </code></pre>
  
  <p>Why this is happening and how I can fix this?</p>