Click here to Skip to main content
14,937,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
need to change this to indian currency format plz help frnds..


// Our original decimal number

$number = 21357.44;

// Let’s use PHP’s built-in function to format the number into US currency

$formatted = number_format($number,2);

// The following statement will print 21,357.44

echo $formatted;

?>
Posted
Updated 9-Jan-14 0:31am
v2
Comments
Killzone DeathMan 9-Jan-14 6:32am
   
It this what you want?
http://stackoverflow.com/questions/10042485/how-to-display-currency-in-indian-numbering-format-in-php

1 solution

Use money_format[^]

PHP
$number = 21357.44;
setlocale(LC_MONETARY, 'en_IN');
echo money_format('%i', $number);
   
Comments
Arun-23 9-Jan-14 6:42am
   
it doesn't work on windows ravi..
Call to undefined function money_format()

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900