Limit Characters for Currency |
[eluser]zeedy2k[/eluser]
ok, need slight bit of help here as its baffling me. I have an amount but need to add VAT to that amount. Now, when I add the VAT (17.5%) to some of the figures it adds triple digit pence eg, £52.875. Is there an easy way to limit the pence to 2 digits? Cheers Robert
[eluser]n0xie[/eluser]
Wouldn't it be easy if PHP has a function that solves these kind of problems? http://nl.php.net/manual/en/function.money-format.php
[eluser]mddd[/eluser]
Code: $val = 45;
[eluser]zeedy2k[/eluser]
Thanks for the replies... found this one just before coming back here $incvat = number_format($vat,2);
[eluser]zeedy2k[/eluser]
[quote author="mddd" date="1280861958"] Code: $val = 45; Thanks mddd thats perfect... |
Welcome Guest, Not a member yet? Register Sign In |