[FX.php List] Decimal rounding

Jon Montgomery igsmasupport at igsmasouth.org
Tue Aug 7 16:08:26 MDT 2007


Steve,
    Here is what I use to show dollar signs to two places on a browser.

<?php echo number_format($searchData['Ttl Entry Fees'][0],2,'.','  '); ?>

I found this at:  http://us.php.net/manual/en/function.number-format.php

Don't know if this is what you are after as I don't need to round, but hope
it helps!

Jon Montgomery
Illinois Grade School Music Association


On 8/7/07 12:04 PM, "Steve St-Laurent" <steve at holecomm.ca> wrote:

> I have three dollar values, formatted to two decimal places both as
> Round calculations and in the number formatting on the layout. But
> I'm unable to get them to the browser with two decimal places.
> Sometimes I get two, sometimes one, sometimes none if the dollars are
> a whole number.
> 
> I'm v-e-r-y new to fx.php and to PHP generally. Any ideas how to
> resolve this? Thx.
> 
> ------------------
> Steve St-Laurent
> Hole-in-the-Wall Communications
> Vancouver, BC | steve at holecomm.ca
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 




More information about the FX.php_List mailing list