html in foreach loop
<p>I have a problem with embeded html in foreach loop:
HTML:</p>

<pre><code>&lt;div class="head"&gt;
&lt;div class="wins"&gt;
    &lt;div class="images"&gt; 
        &lt;a href="#"&gt;&lt;img src="images/1.jpg" alt=""&gt;&lt;/a&gt;
        &lt;a href="#"&gt;&lt;img src="images/2.jpg" alt=""&gt;&lt;/a&gt; 
        &lt;a href="#"&gt;&lt;img src="images/3.jpg" alt=""&gt;&lt;/a&gt; 
    &lt;/div&gt;
    &lt;div class="Bar"&gt; 
        &lt;a href="#" rel="1"&gt;&lt;span&gt;1&lt;/span&gt;Cat1&lt;/a&gt;
        &lt;a href="#" rel="2"&gt;&lt;span&gt;2&lt;/span&gt;Cat2&lt;/a&gt; 
        &lt;a href="#" rel="3"&gt;&lt;span&gt;3&lt;/span&gt;Cat3&lt;/a&gt; 
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p></p>

<p>I want to print html with this function :</p>

<pre><code>function Bar($array){
    $box .= '&lt;div class="images"&gt;';
    foreach($array as $key =&gt; $value){
       $box .= ' &lt;a href="#"&gt;&lt;img src="'.$value['image'].'" alt=""&gt;&lt;/a&gt;';
    }
    $box .= '&lt;/div&gt;';
    return $box;
 }
</code></pre>

<p>I want to break the loop after <code>&lt;div class="images"&gt;</code> and continue loop after the <code>&lt;div class="Bar"&gt;</code> . But Im confusing about this issue. Please show me the right way.
Thanks in advance</p>
