Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Money format

Status
Not open for further replies.

pugs421

Technical User
Joined
Nov 25, 2002
Messages
114
Location
US
setlocale(LC_MONETARY, 'en_US');
echo money_format('%(#1n', $price))

When I use this to format a value to money, it comes out like this $1,000,000.00

I want to remove the zero's to the right of the decimal but I dont know how. I checked the manual and it seems I have to use a '.p' somewhere but I dont know where to place it in the function.


Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top