If you have an list of entity ids, another option to avoid the memory leak and reuse models is to use
<?php $product = Mage::getModel('catalog/product'); foreach ($ids as $id) { $product->getResource()->load($product, $id); /* do stuff */ } ?>
<code>
<blockcode>
<apache>
<bash>
<c>
<cpp>
<drupal5>
<drupal6>
<java>
<javascript>
<perl>
<php>
<python>
<ruby>
<xml>
<foo>
[foo]
More information about formatting options
If you have an list of entity ids, another option to avoid the memory leak and reuse models is to use
<?php $product = Mage::getModel('catalog/product'); foreach ($ids as $id) { $product->getResource()->load($product, $id); /* do stuff */ } ?>