close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

money_format()

Thread began 6/23/2015 2:59 am by Jamie | Last modified 6/24/2015 9:17 am by Ray Borduin | 1526 views | 4 replies |

Jamie

money_format()

Hey Ray

In an orer_results.php page, the Amount column in the results I have set to display

<?php echo (money_format('%.2n', $row_WADAorders['OrderAmount'])); ?>



but this is erroring and showing: Fatal error: Call to undefined function money_format() in C:\xampp\htdocs\fluff\admin_cms\orders_results.php on line 750

Without the string function it works fine, it just doesnt have the decimal to 2 places.

What can I do to get this working ok?

Cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

Use:

<?php echo (number_format($row_WADAorders['OrderAmount'],2)); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thanks Ray. Why would one use one over the other?

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thanks Ray

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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