Currency Format

This sections will contains code regarding different PHP & MySQL features and contains help about php/mysql issues.

Currency Format

Postby MT Shahzad on March 12th, 2008, 3:09 pm

If you need to display numbers in the correct currency format (eg - two decimal places $23.34), use the PHP function
number_format:

Code: Select all
echo number_format($total, 2, '.', ',');
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 300
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Return to PHP / MySQL / XML

Who is online

Users browsing this forum: No registered users and 0 guests

cron