html - how to generate two reports on every single a4 page using while loop in php -


i working on form can generate several reports on single click. these reports maybe in hundreds need print 2 reports on every single a4 page , after loop should jump page print more reports. know simple while loop there can me on this?

here simple while loop know

while($row = mysqli_fetch_assoc($result)){ /**the reports goes here**/  } 

as mention in comment, need combine 2 reports in single div css of page-break like,

$i = 0; while($row = mysqli_fetch_assoc($result)){  if($i % 2 == 0){       echo "<div style='page-break-after:always'>";   }  /**the reports goes here**/  if($i % 2 != 0){       echo "</div>"; // close div taking 2 reports in it.  }  $i++; } 

Comments