mardi 26 juillet 2016

PHP MYSQL sum subtotal

I have a problem, I want to sum up subtotal from invoice order, here's the picture: I wanna sum subtotal before add the shipping cost. I've tried $subtotal = ($subtotal + $totalcost); but didn't work foreach($rows as $row){ $totalsemua = 0; $foto = $row['foto']; $qty = $row['qty']; $name = $row['name_prod']; $price = $row['price']; $totalcost = $price*$qty; $subtotal = ($subtotal + $totalcost); ?> Anybody?

Aucun commentaire:

Enregistrer un commentaire