close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Currency Decimal Formatting

Thread began 8/27/2009 8:52 am by Kevin373660 | Last modified 8/28/2009 11:33 am by Kevin373660 | 29208 views | 4 replies


Thank you Tom for your reply. So it requires php formating. I am on WinXP, and read up fast and found these notes on, which confirms the need to use the function that you recomened:

Note: The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, so money_format() is undefined in Windows.
Note: The LC_MONETARY category of the locale settings, affects the behavior of this function. Use setlocale() to set to the appropriate default locale before using this function.

I tried the following:


<?php setlocale(LC_MONETARY, 'en_US'); ?>

<div class="WADAResultPrice">Only $<?php echo money_format('%(#6n', $row_WADAproducts["ProdPrice"]); ?></div>


ERROR on page when displayed in a browser. I must be missing something in defining the fuction. Please advise if you can see where I went wrong. P&T:

Only $PHP Fatal error: Call to undefined function money_format() in {my site directory}shopping\Catalogue_Results.php on line 517


Are you sure that using the setlocale() is a wise idea? Additional notes on below indicate to me that it may depend on the local cpu and that would not give a consistanct display of costs for users. It might also explain why I recieved the error message. I might be wrong. I am new to php.

Return Values
Returns the new current locale, or FALSE if the locale functionality is not implemented on your platform, the specified locale does not exist or the category name is invalid.

An invalid category name also causes a warning message. Category/locale names can be found in » RFC 1766 and » ISO 639. Different systems have different naming schemes for locales.
Note: The return value of setlocale() depends on the system that PHP is running. It returns exactly what the system setlocale function returns.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...