function deleteExtaAttribute($item_id, $attIdList) { $productHelper = new productHelper(); $DbAtt_list = $productHelper->getAttributeList($item_id); // ITEM HAS ATTRIBUTES if (!empty($DbAtt_list)) { if (empty($attIdList)) { foreach ($DbAtt_list as $dbid) { $productHelper->delWholeAttribute($dbid); } } else { foreach ($DbAtt_list as $dbid) { if (!in_array($dbid, $attIdList)) { $productHelper->delWholeAttribute($dbid); } } } } }