PHP number format indian currency

Answers 1
  • Number format indian currency in php

    $fmt = new NumberFormatter('en_IN', NumberFormatter::CURRENCY);
    echo $fmt->formatCurrency(1234567.891234567890000, "INR")."\n";
    ₹ 12,34,567.89

    This code snippet converts a number into a indian currency number format. Here we use the formatCurrency() method on  NumberFormatter class which is an in-build in php.

  • Back to code snippet queries related php