I have the following code...
$string1 = 40.10;
$string2 = 0.70;
$holder = $string1 + $string2;
when I echo $holder, I get 40.8
Is there any way that I can keep the trailing "0" at the end so that it reads 40.80 ?
If you are familiar with the C language functions of printf() and sprintf() then they work the same way in PHP.
If you are not (like me ) then use number_format()
echo number_format($holder, 2);
I looked for ages at PHP.net for a function that would do this. Can't have looked hard enough!
Thanks again freakysid, you're a star.