title: Add values to an existent array keeping the same key
body: <p>I want to have an array following this pattern:</p>
  
  <pre><code>[1] =&gt; Array
         (
             [es] =&gt; 11
             [pt] =&gt; 22
             [br] =&gt; 333
         )
  [2] =&gt; Array
         (
             [es] =&gt; 1221
             [pt] =&gt; 23442
             [br] =&gt; 344433
         )
  </code></pre>
  
  <p>Every item (including the key) comes from a query. So, I've tried including items in the following way:</p>
  
  <pre><code>array[1]= array('es'=&gt;'11');
  array[1]+= array('pt'=&gt;'22');
  </code></pre>
  
  <p>This works fine if I <em>hardcode</em> the data manually. However, it fails when iterating through the mysql data:</p>
  
  <pre><code>foreach($elements as $value) {          
      $available = $value['purchased'] - $value['used'];
      $credits[$value['type']]= array($value['country']=&gt;$availableCredit);
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Fatal error: Unsupported operand types</p>
  </blockquote>
  
  <p>P.S. <code>$value['type']</code> only comprises "1" or "2".</p>