if ( $ip <= $nrpoze)
{
$rowprod = mysql_fetch_array($resultprod);
$id_poza=$rowprod[1];
$resimg=mysql_query("select * from img where (idpoza='$id_poza') order by id");
$rowimg = mysql_fetch_array($resimg);
?>
}
$ip= $ip + 1;
?>