How do I make this loop once, break then continue the loop?
<p>I am looping the div horizontally with float:left and it works the way it should but the problem is each div has a unique height that is influenced by the content contained within, so the result can be messy looking when the browser is re sized. I would like for the php to loop once, break, then start a new row so that it looks the same no matter how the browser is sized.</p>

<p>If it's not already obvious, I am not good with php and struggled to piece together what I have.</p>

<pre><code>&lt;?php
$url = "XML.php";
$xml = simplexml_load_file($url);
$namespaces = $xml-&gt;getNamespaces(true); // get namespaces
for($i = 0; $i &lt; 10; $i++){

    $poster = $xml-&gt;channel-&gt;item[$i]-&gt;children($namespaces['x'])-&gt;poster;
    $html .= "&lt;div class='wrapper' style='float:left;'&gt;$poster&lt;/div&gt;";}

echo $html;
?&gt;
</code></pre>