tags:

views:

81

answers:

4

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
echo number_format(10000/10); ;)
Matt Ellen
+2  A: 

number_format

Matt
+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
+2  A: 
number_format(10000/10)

=)

Galen
There should be a `Literal` badge. Good show!
Pablo