echo "<table style='border: 1px solid white' align='left' bgcolor='' border='1' width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr>
<th align='center' width=''><font size='2'>Cliente</th>
<th align='center' width=''><font size='2'>Documento</th>
<th align='center' width=''><font size='2'>Numero</th>
<th align='center' width=''><font size='2'>Emissione doc.</th>
<th align='center' width=''><font size='2'>Codice cliente</th>
<th align='center' width=''><font size='2'>Importo euro</th>
<th align='center' width=''><font size='2'>-</th>
<th align='center' width=''><font size='2'>Data operazione</th>
<th align='center' width=''><font size='2'>Tipo operazione</th>
</tr>";
$totale_importo = 0;
while($row = mysql_fetch_array( $result )) {
$id=$row['id'];
echo "<tr>
<td align='center'><font size='2'>".$row['nome']."</font></td>
<td align='center'><font size='2'>".$row['doc']."</font></td>
<td align='center'><font size='2'>".$row['numero']."</font></td>
<td align='center'><font size='2'>".$row['emissione']."</font></td>
<td align='center'><font size='2'>".$row['codcliente']."</font></td>
<td align='center'><font size='2'>".$row['importo']."</font></td>
<td align='center' width='20'><font size='2'></font></td>
<td align='center'><font size='2'>".$row['data']."</font></td>
<td align='center'><font size='2'>".$row['tipo']."</font></td></tr>";
$importo=mysql_result($result,$i,"importo");
$totale_importo += $importo;
$i++;
}
echo "</table><br>";