Menu
Hi I’m very new to PHP and I’m have a small problem.
I have my grandtotal variable displaying using the code below
[code]echo “<tr><td>Grand Total:”.$grandtotal.”</td></tr>”;
but I need it to round up to have only 2 decimal places it seems to work when i try this
[code]echo (number_format(“$grandtotal”, 2));
but I need it to be placed inside my table and I’m unsure of the syntax i’ve tried something like this with no luck.
[code]echo “<tr><td>Grand Total:”(number_format($grandtotal,2))”</td></tr>”;
can someone help me out with the syntax on this one?
thanks