$row=query // get data from database echo "<table>"; while(.....) { echo "<tr><td>".$row[username]."</td</tr>"; //Print 10 records//Print message//Print 10 records//Print message } echo "</table>";
$i=1;foreach ($rows as $row) { echo '<tr><td>' . $row['username'] . '</td></tr>'; if ($i%10==0) { echo '<tr><td>' . $message . '</td></tr>'; } $i++;}