I have this foreach loop:
foreach($aMbs as $aMemb){
$ignoreArray = array(1,3);
if (!in_array($aMemb[\'ID\'],$ignoreArray)){
$aMemberships[]
Your existing code uses incremental key and uses the array as corresponding value.
To make make $aMemberships
an associative array with key as $aMemb['ID']
and value being $aMemb['Name']
you need to change
$aMemberships[] = array($aMemb['ID'] => $aMemb['Name']);
in the foreach loop to:
$aMemberships[$aMemb['ID']] = $aMemb['Name']);