[FX.php List] Decimal rounding

Gjermund Gusland Thorsen ggt667 at gmail.com
Tue Aug 7 16:46:33 MDT 2007


This is also an option: http://www.php.net/manual/en/function.money-format.php

On 8/8/07, Jon Montgomery <igsmasupport at igsmasouth.org> wrote:
> 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
> >
>
>
> _______________________________________________
> 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