Ver original$l=10;while (/*aca va la consulta con fecth o row*/) { if($l==10) { echo 'Hola'.'<br>'; $l=0; }$l++;}