Jump to content

Force to 2 decimal points


billhobbs

Recommended Posts

<?php $totalcreditstd = $row_rsCreditPurchaseMoney['SUM(quantity)']; $totalcreditsdollar = $totalcreditstd * $Mutliplier; echo $totalcreditsdollar; ?>

 

I'm using the above calculation to display a total amount.

Problem is that if the calculation total is 7.5 I want it to show up as 7.50 I want to force the second number. How can I do that? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/214445-force-to-2-decimal-points/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.