Posted By

rccc on 01/27/11


Tagged

Modulo


Versions (?)

modulo


 / Published in: PHP
 

  1. <?php for($i = 0;$i < 12; $i++): if($i % 4 == 0): ?>
  2. <div>
  3. <?php else: ?>
  4. <span> test </span>
  5. <?php endif; if( ($i+1) % 4 == 0): ?>
  6. </div>
  7. <?php endif; endfor; ?>

Report this snippet  

You need to login to post a comment.