How to calculate in a loop ?

How to calculate in a loop ?

Hello

Ho can I calculate values extract from the table and dsiplayed in a loop ? 

I would like to calculate : for ex : 800 + 10 = 810;

Thank you ! 

This is the code below : 

while($data = $sql_04->fetch(PDO::FETCH_OBJ))
{
$modeDistribution = $data -> mode;
$frequence = $data -> frequence;
$frequence_2 = $data -> frequence_2;
$quantite = 0;
if($modeDistribution == "Marche" ) { $modeDistribution = "Marché"; }
//--------------------------------------
//Duree recolte
if($frequence_2 == "jour") { $quantiteTotalePeriode = ($recolteCount * 20) * $frequence; }
if($frequence_2 == "semaine") { $quantiteTotalePeriode = ($recolteCount * 4) * $frequence; }
if($frequence_2 == "mois") { $quantiteTotalePeriode = ($recolteCount * 1) * $frequence; }
echo '<tr>
<td><b>'.$modeDistribution.'</bi></td>
<td>'.$frequence.'/'.$frequence_2.'</td>
<td><input type="number" name="quantiteTotalePeriode" class="quantiteTotalePeriode" value="'.$quantiteTotalePeriode.'" style="width:100px;" readonly /></td>
<td style="text-align:right; padding-right:20px; "><input type ="number" style="width:100px;" name="poids['.$modeDistribution.']" class="poids" value = "" /></td>
<td style="text-align:right; padding-right:20px; "><input type ="number" style="width:100px;" name="poidsTotal['.$modeDistribution.']" class="poidsTotal" value = "" /></td>
</tr>';
}
echo '<tr>