Posted By

princeofvegas on 05/19/11


Tagged

mysql php


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

boksiora


Insert After X Number of Rows


 / Published in: PHP
 

  1. <?php
  2. $i = 1;
  3. while ($x < 17){
  4. echo 'Data ' . $i . '<br>';
  5.  
  6. //Change Value to how many rows you want to insert after.
  7. if( ($i % 3) == 0 ){
  8. echo 'Snippet of text--<br>';
  9. }
  10.  
  11. $i++;
  12. $x++;
  13. }//while
  14. ?>

Report this snippet  

You need to login to post a comment.