How to display Currency in Indian Numbering Format in PHP

后端 未结 22 2140
一整个雨季
一整个雨季 2020-12-01 06:14

I have a question about formatting the Rupee currency (Indian Rupee - INR).

For example, numbers here are represented as:

1
10
100
1,000
10,000
1,00,00         


        
22条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 06:54

    heres is simple thing u can do ,

     float amount = 100000;
    
     NumberFormat formatter = NumberFormat.getCurrencyInstance(new Locale("en", "IN"));
    
     String moneyString = formatter.format(amount);
    
     System.out.println(moneyString);
    

    The output will be , Rs.100,000.00 .

提交回复
热议问题