Money Format HELP!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Money Format HELP!!

Post by AliasBDI »

I have an online invoice page. Here is my echo:

<?php echo $disctot; ?>

This shows the TOTAL of the invoice. However, sometimes it shows it like this "10000.4". When it should read "10,000.40". How can I get it to show:

->Two digits after decimal,
->A comma every 3 numbers.

Thanks.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Post Reply