Data Storage - Format numbers

This is Interesting: Free IT Magazines  
Home > Archive > Data Storage > July 2005 > Format numbers





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Format numbers
bettina@coaster.ch

2005-07-30, 7:46 am

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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com