the normal number is 10000 i want it 1,000 how i can do it thanks
+13
A:
echo number_format(10000);
More info here: http://ca3.php.net/number_format
mabwi
2009-12-16 14:45:35
echo number_format(10000/10); ;)
Matt Ellen
2009-12-16 14:47:28
+5
A:
Use number_format
$strNum = number_format(1000);
There is no requirement to use the 4 parameter overload, as (from the documentation)
If only one parameter is given, number will be formatted without decimals, but with a comma (",") between every group of thousands.
So
number_format(1000);
is in effect
number_format(1000, 0, '.', ',');
Yacoby
2009-12-16 14:45:47