title: For loop is working only once
body: <p>For the below code, where I am trying to update a custom attribute called branding. The for loop is running only for one iteration and stopping. It is updating only the first product in the list and not looping any further. </p>
  
  <p>Can anyone kindly let me know why this is happening? </p>
  
  <pre><code>&lt;?php
  set_time_limit(0);
  
  // require magento core
  require_once 'app/Mage.php';
  
  // execute on admin store
  Mage::app()-&gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
  
  $products = Mage::getModel('catalog/product')-&gt;getCollection();
  
  foreach($products as $product){
       echo $product-&gt;getSku();
       $product-&gt;setData('branding', 'kib');
       $product-&gt;save();  
  }
  </code></pre>