homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
problem setting prices in 2 digits
problem setting prices in 2 digits
wnshops




msg:4381477
 3:28 am on Oct 31, 2011 (gmt 0)

I need help. I am work on the prices lists
$22.00 but the
Incorrect price $22.000 display. Help what is a code to set up

 

Mahabub




msg:4381531
 9:26 am on Oct 31, 2011 (gmt 0)

Here Is the Solution...

number_format($number, 2, '.', '');

Thanks
Mahabub

rocknbil




msg:4382171
 5:13 pm on Nov 1, 2011 (gmt 0)

echo sprintf("%.2f",$number);

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved