I am having trouble getting a variable to hold the formatting I want. I have two variables that are being sent from a previous page:
$BasePrice = 60.00
$Base = 1
I then multiple them together to get BaseTotal.
$BaseTotal = $BasePrice * $Base
When I echo $BaseTotal now I get 60 instead of 60.00. Why is this?
I did a gettype() on $BaseTotal and it returns 'double' and I tried setting Base to 1.0 instead of 1, and I still end up with BaseTotal = 60. What am i missing?
What is the recommened way to store money in PHP?
Thanks in advance!