Reputation: 37
How to display numbers with format(1234->as 1,234) while selecting values from database
SELECT rates,invoice FROM data;
Now Rates are displaying as 235693 like this,but i want display it as 2,35,693.
Upvotes: 2
Views: 166
Reputation: 941
You also use PHP function -
number_format($num)
Also look on link - http://php.net/manual/en/function.number-format.php
Upvotes: 1
Reputation: 327
you can use function : number_format($number)
<?php
$number = 10000;
$formatted_number = number_format($number);
?>
Upvotes: 2