Question

How do I use the currency method to format my numbers into GBP (£) ?

The following code in returning $110.00, I want it to return £110.00 please

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

Solution

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

Check out the api docs: http://api12.cakephp.org/class/number-helper#method-NumberHelpercurrency

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top