title: Create associative array from Foreach Loop PHP
body: <p>I have this foreach loop:</p>
  
  <pre><code>foreach($aMbs as $aMemb){
      $ignoreArray = array(1,3);
      if (!in_array($aMemb['ID'],$ignoreArray)){ 
          $aMemberships[] = array($aMemb['ID'] =&gt; $aMemb['Name']);
      }
  }
  </code></pre>
  
  <p>This prints out the right fields but they are arrays inside arrays.  I need the foreach loop to output a simple array like this one:</p>
  
  <pre><code>$aMemberships = array('1' =&gt; 'Standard', '2' =&gt; 'Silver');
  </code></pre>
  
  <p>What am I doing wrong?</p>