Guten Morgen allerseits!
Ich habe eine Datenbank in der diverse Werte stehen.
Diese berechne ich mittels PHP und gebe das Resultat aus.
Da es mehrere Ergebnisse gibt, sind die in einer Schleife und
werden aufgelistet.
So sieht die Berechnung aus:
PHP-Code:
<?php
$income = $row_sampler['total'];
$topay1 = $income/2;
echo round($topay1,2);
?>
Und das ist die Schleife im ganzen:
PHP-Code:
<?php do { ?>
<tr class="Stil9">
<td width="250"style="border-bottom:1px; borderbottom-color:#000000; border-bottom-style:solid"><?php echo $row_sampler['artist']; ?> - <?php echo $row_sampler['title']; ?></td>
<td style="border-bottom:1px; borderbottom-color:#000000; border-bottom-style:solid"><?php echo $row_sampler['label']; ?></td>
<td style="border-bottom:1px; borderbottom-color:#000000; border-bottom-style:solid"><?php echo $row_sampler['sampler']; ?></td>
<td class="Stil7"style="border-bottom:1px; borderbottom-color:#000000; border-bottom-style:solid"><div align="right">€
<?php
$income = $row_sampler['total'];
$topay1 = $income/2;
echo round($topay1,2);
?>
</div></td>
</tr>
<?php } while ($row_sampler = mysql_fetch_assoc($sampler)); ?>
Wie kann ich die Werte in der kompletten Schleife adieren?
Für ne Hilfe wäre ich sehr dankbar!