Hi
just use the PHP function number_format().
I'll show to you how this can be use:
function fndec($a) {
if ( ($a/1024) < 1024) {
$a=number_format( ($a/1024) , "," , "," , "," )."Kb";
} else {
if ( ($a/(10241024)) < 1024) {
$a=number_format( ($a /(10241024)),"," )."Mb";
}
}
return $a;
}
this a function that convert a number size of any file to Kb or Mb, depending of size.
Dico Reyers wrote:
Hi there,
Is there an easy way, a function or something, that will take a floating number such at 1000.00 or 250000.00 and change it to 1,000.00 and 250,000.00?
Thanks in advance,
-dr