[FX.php List] Decimal rounding

Dale Bengston dbengston at preservationstudio.com
Tue Aug 7 19:56:29 MDT 2007


Watch out though. The money_format function does not work if your PHP/ 
web server is running on Windows.

Dale

On Aug 7, 2007, at 5:46 PM, Gjermund Gusland Thorsen wrote:

> 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
>>
> _______________________________________________
> 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