Cita:
Iniciado por josemi Hola,
Mas o menos, necesitas algo as:
Código PHP:
$total=0;
while (....) { //tu bucle while
....
$total+ = $subtotal; // igual que $total=$total+$subtotal
} // fin de tu bucle while
echo $total;
Es lo que se llama un acumulador.
Saludos.
Ok ha funcionado como dice Josemi, aunque también está interesante hacerlo por consultas SQL..