Re: Re: Fwd: Hmmm.. I think I need your advice here to get in correct direction...
| From: | Lester Caine | Date: | Wed, 10 Jul 2013 13:25:11 +0000 |
| Subject: | Re: Re: Fwd: Hmmm.. I think I need your advice here to get in correct direction... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321595@lists.php.net to get a copy of this message | ||
Karl-Arne Gjersøyen wrote:
$total = 0;// start the table
echo "<table border=1>"; echo "<tr><th>Product</th><th>**Amount</th></tr>"; // loop thru each item found while ($results = $qrslts->fetch(PDO::FETCH_**ASSOC)) { echo "<tr><td>".$results['product_**name']."</td><td>".$results['** product_amt']."</td></tr>"; $total += $results['product_amt']
}echo "<tr><td>Total:</td><td>".$total."</td></tr>";
// finish the table html echo "</table"; Yes that part is OK. I do have problem to add total weight and package at bottom of the table like this: Product_one 40kg Product_two 60kg --------------------------- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.ukTotal: 100kg===============