如何在PHP中以印度编号格式显示货币 [英] How to display Currency in Indian Numbering Format in PHP
本文介绍了如何在PHP中以印度编号格式显示货币的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要将此更改为印度货币格式plz帮助frnds ..
//我们的原始十进制数
$ number = 21357.44;
//让我们使用PHP的内置函数将数字格式化为美元< br $>
$ formatted = number_format($ number,2);
//以下语句将打印21,357.44
echo $ formatted;
?>
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;
?>
推荐答案
number = 21357.44;
//让我们使用PHP的内置函数将数字格式化为美元
number = 21357.44;
// Let’s use PHP’s built-in function to format the number into US currency
formatted = number_format(
formatted = number_format(
number,2);
//以下语句将打印21,357.44
echo
number,2);
// The following statement will print 21,357.44
echo
这篇关于如何在PHP中以印度编号格式显示货币的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文