how to pass the value and limit the loop
<pre><code>&lt;?php

  $col = 0;
  if ($num_products_count &gt; 0) {
    while (!$specials_index-&gt;EOF) {
      $list_box_contents[$row][$col] ='&lt;a&gt;'.$specials_index-&gt;fields['products_name']. '&lt;/a&gt;';
      $col ++;
    }
  }

?&gt;
</code></pre>

<p>How do I limit the loop to only five iterations?</p>

<p>When I do the first loop, I want the <code>$specials_index-&gt;fields['products_name']</code> value to be <code>&lt;img src="1.jpg"&gt;</code>. the second is <code>&lt;img src="2.jpg"&gt;</code>, the third is <code>&lt;img src="3.jpg"&gt;</code>, the fourth is <code>&lt;img src="4.jpg"&gt;</code>, the fifth is <code>&lt;img src="5.jpg"&gt;</code></p>

<p>How can I achieve this?</p>
