Magento 2 Certification Questions List | How to get product collection which IDs are in array(16,17,18,20) ?

How to get product collection which IDs are in array(16,17,18,20) ?

Answer:
  • $collection->addFieldToFilter('entity_id', array(16,17,18,19));
Prepear for Magento 2 certefication with our interactive quiz