Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP format for Lakh and Crore [duplicate]

Want to format number in php like 1,00,00,00,000. I am trying the following function number_format($var['count']) but it is giving me following answer 1,000,000,000

Thanks and Regards

like image 330
Rahul Singh Avatar asked Dec 10 '22 18:12

Rahul Singh


1 Answers

You can try this, to do additional formatting read through PHP's documentation: PHP.NET - Money Format

$dollar = 6000000000;
setlocale(LC_MONETARY, 'en_IN');
echo $dollar = money_format('%!i', $dollar);

Output: 6,00,00,00,000.00

like image 122
yardie Avatar answered Dec 15 '22 00:12

yardie