magento Get Products from Database Get data form product collection


Example

// First load a collection object

foreach($collection as $product) {
    
    $product->getSku();
    $product->getName();

    // Alternative method
    $product->getData('sku');
    $product->getData('name'); 
}