matlow Posted November 17, 2006 Share Posted November 17, 2006 I am wondering if anyone can help me with a simple GST script. I have the following script which calculates a 10% GST but when I echo the script, it is unformatted. eg If the total amount is $90.00 it shows the GST to be 9 instead of 9.00. <?php$gst = ($TValue / 10)?><?php echo $gst ?>I am very new to all this and any help would be greatly appreciated. Thanks... Link to comment https://forums.phpfreaks.com/topic/27562-please-help-with-gst-script/ Share on other sites More sharing options...
nick89 Posted November 17, 2006 Share Posted November 17, 2006 what happens if you change it to: $gst = (float)($TValue / 10);? Link to comment https://forums.phpfreaks.com/topic/27562-please-help-with-gst-script/#findComment-126065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.