title: Filling Dynamic Array
body: <p>how can i fill following type array dynamically in for loop</p>
  
  <pre><code>$trans2 = array(); 
  $username = array("John","Steve"); 
  $categories = arra("cat1","cat2","cat3");
  </code></pre>
  
  <p>result must be: </p>
  
  <pre><code>[0] =&gt; Array ( [Name] =&gt; John [cat1] =&gt; 0 [cat2] =&gt; 0 [cat3] =&gt; 0 )
  
  [1] =&gt; Array
  (
      [Name] =&gt; Smith
      [cat1] =&gt; 0
      [cat2] =&gt; 0
      [cat3] =&gt; 0
  )
  </code></pre>
  
  <p>Thanks in advance!</p>