Create a wrapper around specified number of fields in views I like to wrap 3 elements of a view in a div.
I got this code, but it doesn't seem to work. It keeps printing the div but never the /div which makes everything nested in the previous row.

&lt;?php if($i % 3 == 0){ print '&lt;div class="row"&gt;'; } ?&gt;
&lt;?php print $row; ?&gt;
&lt;?php if($i % 3 == 2){ print '&lt;/div&gt;'; } ?&gt;


Any suggestions?
Semantic Views module will let you configure HTML output easily.