[FX.php List] Currency Formatting

Dale Bengston dbengston at preservationstudio.com
Tue Jul 18 09:52:19 MDT 2006


Hi Jonathan,

money_format(i%, $findData['TotalCost'][0]);

...should do it. The value from FX must be a number. Are you getting  
unexpected results, or no results? Some installs of PHP do not have  
support for money_format, so you may want to substitute number_format 
() instead.

http://us3.php.net/manual/en/function.money-format.php

Hope this helps,
Dale Bengston

On Jul 18, 2006, at 11:32 AM, Jonathan Schwartz wrote:

> Can't quite figure out where to insert the money_format() function.  
> Any suggestions?
>
>
> <? setlocale(LC_MONETARY, 'en_US');
> ?>
>
> <?php echo $findData['TotalCost'][0] ;
> ?>
>
>
> Here is what I tried:
>
> <?php echo money_format(i%, $findData['TotalCost'][0]   ) ;
> ?>
>
> <?php echo $findData[money_format(i%, 'TotalCost')  ][0] ;
> ?>
>
> Thanks
>
>
> J
> -- 
>
> Jonathan Schwartz
> Schwartz & Company
> 817 Marin Drive
> Mill Valley, CA 94941
> Phone: 415-381-1852
> jonathan at eschwartz.com - http://www.eschwartz.com
>
> _______________________________________________
> 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