PHP - Adding divs to a foreach loop every 4 times
<p>I need a little help with a foreach loop.</p>

<p>Basically what i need to do is wrap a div around the output of the data every 4 loops.</p>

<p>I have the following loop:</p>

<pre><code>foreach( $users_kicks as $kicks ) {
    echo $kicks-&gt;brand;
}
</code></pre>

<p>For every 4 times it echos that out i want to wrap it in a  so at the end it will look like so:</p>

<pre><code>&lt;div&gt;
    kicks brand
    kicks brand
    kicks brand
    kicks brand
&lt;/div&gt;
&lt;div&gt;
    kicks brand
    kicks brand
    kicks brand
    kicks brand
&lt;/div&gt;
&lt;div&gt;
    kicks brand
    kicks brand
    kicks brand
    kicks brand
&lt;/div&gt;
</code></pre>

<p>and so on.</p>

<p>Cheers</p>
