Re: [PHP] Re: Fwd: Hmmm.. I think I need your advice here to get in correct direction...

[email protected] (Karl-Arne Gjersøyen)
Newsgroups php.general
Message-ID <CAN78Z6B6VDjygbYtK+Ptjq4ES+2AkYZEDW990EawUkvSyg8c3g@mail.gmail.com>
2013/7/10 Lester Caine <[email protected]>

> Karl-Arne Gjersøyen wrote:
>
>> // start the table
>>>
>>
> $total = 0;
>
>  >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
>> -------------------------
>> Total:             100kg
>> ===============
>>
>
>
Thank you very Much, Both of you Jim and Lester!
You are amazing, folks!

Karl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.