Forum Moderators: coopster
On a particular php page, I'm drawing 2 different numbers from 2 fields in a table. These two fields both have a type of float(3,2).
Then, I echo an addition of both numbers to my page, like this: echo ("$standard" + "$roomHigh");
$standard has the number "57.00". $roomHigh has the number "19.00".
Strictly speaking, all is well, as what echos to the page is the sum of both numbers: "76". But that's the problem...as my client pointed out. He wants to reflect "76.00", not just "76", because other numbers on the page (which are echoed without any calculation) show up with their trailing zero's intact.
So... there must be an easy fix to this (one would hope). I thought of tacking on the trailing zeros manually, but that doesn't seem like a good solution if there's a built-in way to do it.
All assistance greatly appreciated.
Neophyte.