Código PHP:
   while ($fila1=mysql_fetch_array($consulta1)){ 
 
$consulta2=mysql_query("SELECT * FROM productos WHERE id ='".$fila1['id_producto']."'",$conexion);
 
$fila2=mysql_fetch_array($consulta2);
 
 
// ESTOS SON LOS SUBTOTALES QUE QUIERO SUMAR
 
$sub_total=$fila1['cantidad']*$fila2['precio_producto'];
 
// ES DECIR, EN CADA VUELTA "$sub_total" TENDRÁ UN VALOR DISTINTO
// Y YO , QUIERO SUMAR ESOS VALORES PARA OBTENER UN RESULTADO TOTAL COMO HAGO????
 
 
 
 
} 
    
 

