Format numbers
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Format numbers

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Storage System
Author Message
Guest






Posted: Sat Jul 30, 2005 3:24 pm    Post subject: Format numbers Reply with quote

In my database I keep width and height as float numbers. These measures
have sometimes decimal places and sometimes not.
I know that with number_format($mynumber,2,'.',' ') for example I can
determine the number of decimal places, etc, etc.
The problem is that I want to show the format with '.' or ',' depending
on the language but not a fix number of decimals. For example:
34,50 should be 34,50 or 34.50 depending on the language... and
33 should be 33 ... I don't want that it will be shown as 33,00 or
33.00.
Is there a way to combine the possibility of change between '.' and ','
and also varying the number of decimal places?
Thanks in advance.
Bettina
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Storage System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB