title: initialization for array of arrays in PHP
body: <p>I want to dynamically create arrays of arrays and I have no clue how to initialize my arrays...</p>
  
  <p>Here is the code:</p>
  
  <pre><code>$resT= array();
  $resR= array();
  foreach ($cursor as $obj) {
     if ($obj == NULL) continue;
     $c="XX";
     if (test1)         $c=$obj['GC'];
     array_push($resT[$c],$obj['AT']);
     array_push($resR[$c],$obj['AR']);
  }
  </code></pre>
  
  <p>I got this: array_push() expects parameter 1 to be array</p>
  
  <p>Thanks,</p>
  
  <p>Amir.</p>