进行计算:<! - ?php echo''。$ Total。''? - >

时间:2014-09-09 12:14:41

标签: php

我将如何采取以下措施并进行以下计算:

总计* 2/100并以小数位显示(£)磅。

所以示例1000(TOTAL)将是£20.00

2 个答案:

答案 0 :(得分:0)

&pound;<?php echo number_format( ($total * 2) / 100, 2); ?>

答案 1 :(得分:0)

number_format - 格式化分组数千的数字 http://php.net/manual/ru/function.number-format.php