title: Magento - List a product collection without the foreach
body: <p>I have a product collection loaded with 6 products. I need to list these products without the foreach, because each product have a different layout structure.
  How can I call each product outside the foreach?</p>
  
  <p>My code is:</p>
  
  <pre><code>&lt;?php
  
    $produtos = array(1115,1105,1019,1017,1013,1011);
    $_productCollection=$this-&gt;getLoadedProductCollection();
    $_productCollection = clone $this-&gt;getLoadedProductCollection();
    $_productCollection-&gt;clear()
                       -&gt;addIdFilter($produtos)
                       -&gt;load();
    $_helper = $this-&gt;helper('catalog/output');
  ?&gt;
  </code></pre>
  
  <p>The variable $produtos is an array with the product IDs that I want in the collection</p>
  
  <p>Then, i need to set variables for each product attribute. Im doing like this:</p>
  
  <pre><code>&lt;?php foreach ($_productCollection as $_product): ?&gt;
      &lt;?php 
          if($_product-&gt;getId() == $produtos[0]){
              $productName1 = $_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name'); 
              $productImage1 = '&lt;img border="0" src=".'echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'small_image')-&gt;resize(143,215);'." /&gt;';
              $precoCru1 = $_product-&gt;getFinalPrice(); $productPrice1 = Mage::helper('core')-&gt;currency($precoCru1, true, false);
              $productUrl1 = $_product-&gt;getProductUrl();
          }
  
          elseif($_product-&gt;getId() == $produtos[1]){
              $productName2 = $_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name'); 
              $productImage2 = '&lt;img border="0" src=".'echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'small_image')-&gt;resize(143,215);'." /&gt;';
              $precoCru2 = $_product-&gt;getFinalPrice(); $productPrice1 = Mage::helper('core')-&gt;currency($precoCru1, true, false);
              $productUrl2 = $_product-&gt;getProductUrl();                      
          }
      ?&gt;                  
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>The product name, url and price are working, but the image not. When I echo each product image, it gave me the same URL </p>