蛋糕1.2货币法入GBP£

时间:2012-04-19 15:28:22

标签: cakephp cakephp-1.2

如何使用货币方法将我的数字格式化为GBP(£)?

以下代码返回$ 110.00,我希望它返回£110.00

 <div id="subtotal"> <?php echo $number->currency($invoice['Invoice']['subTotal']); ?></div>

1 个答案:

答案 0 :(得分:2)

echo $number->currency($invoice['Invoice']['subTotal'], 'GBP');

查看api文档:http://api12.cakephp.org/class/number-helper#method-NumberHelpercurrency