homepage Welcome to WebmasterWorld Guest from 50.17.176.149
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved