try

printf("<p>Total : %.2f</p>", round($hoursrow[0], 2);

Elliott

----------
>From: "bryan" <[EMAIL PROTECTED]>
>To: "db" <[EMAIL PROTECTED]>
>Subject: [PHP-DB] subtotal
>Date: Wed, Feb 14, 2001, 10:55 AM
>

> Good day all...
>
> Does anyone know how, if I have a "*.00" at the, I can just leave that on?
> When I round, it does round,
> but, if I have a total of $13.00, I want it to read ($13.00) not ($13).
>
> here is my weak, but working code...
>
>
****************************************************************************
*********
> ***
>
> $totalsql = "SELECT SUM(total) FROM entry WHERE user_id='$passedid'";
> $totalresult = mysql_query($totalsql);
>
> $totalrow = mysql_fetch_array($totalresult);
>
> print "<P>Total : ".round($hoursrow[0], 2)."</P>";
>
>
****************************************************************************
*********
> **
>
> thanks...
>
>
> Bryan Fitch
> Programmer
> Concept Factory
> [EMAIL PROTECTED]
> http://www.concept-factory.com
>
>
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to