Codice PHP:
$totale=0;
while (
$rowb mysql_fetch_array($q_query)) {
   
$totalix_sub $rowb[costo];
  
$totale += $totalix_sub;
 }
echo 
$totale