Create a view with specific number of columns per row without table

My frotend guy asked me to put 3 columns of data per one row in views output so he can put zen grids over them. Not sure if he really needs that but I made it for him with a view template. Selected unformmated display style type, created template
views-view-unformatted--taxonomy-term.tpl.php and added the code that detects when number 3 occurs, or to say what it in code, we check the ID and if it is divided by 3 and has no leftover (% module operator) then we detect it is time for a new group. Here it is:

<?php if (!empty($title)): ?>
  <h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
	  <?php if($id % 3 == 0){ print '<div class="group">'; } ?>
  <div<?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"';  } ?>>
    <?php print $row; ?>
  </div>
    <?php if($id % 3 == 2){ print '</div>'; } ?>
<?php endforeach; ?>
	<?php if($id % count($rows) == $id || $id % 3 != 2){ print '</div>'; } ?>