title: WordPress Advanced Custom Fields Repeater, wrap every 3 divs in a row
body: <p>I'm using Advanced Custom Fields, and I would like to wrap every 3 divs in a row.  If there is a fourth div or 2 extra then those would get wrapped in their own row.  So open and close with a row. </p>
  
  <p>I currently have the basic output but all my current attempts to add the counter have failed.  Any help would be appreciated </p>
  
  <pre><code>&lt;?php // wrap every 3 divs in a row
  
       if(get_field('triple_column_2')): ?&gt;
  
       &lt;?php while(has_sub_field('triple_column_2')):  ?&gt;
  
              &lt;div class="col-sm-4"&gt;
                &lt;?php the_sub_field('copy'); ?&gt;
              &lt;/div&gt;
  
        &lt;?php endwhile; ?&gt;
  
       &lt;?php endif; ?&gt;
  </code></pre>