На всеки пет резултата

Lasevg

Registered
Може ли на всеки пет резултата да се изписва код :? :)
Код:
while($s=mysql_fetch_assoc($qq2))
{
echo '<div style="width:75px;height:95px;border:3px #444 solid;float:left;margin-left:32px;"><div style="margin-top:-25px;">'.$s['user'].'</div></div>';

}
 
$i = 1;
while($s=mysql_fetch_assoc($qq2))
{
if($i == 5) {
echo "кодът";
$i = 1;
}


echo '<div style="width:75px;height:95px;border:3px #444 solid;float:left;margin-left:32px;"><div style="margin-top:-25px;">'.$s['user'].'</div></div>';

$i++;

}
 

Back
Горе