Jump to content

[SOLVED] define a variable to a float type


Voodoo Jai

Recommended Posts

Hi again all

I have 2 variables that I take from my database that are of the type FLOAT what I want to do is add them together to give a FLOAT value.

My problem is that I want it to show the figures after the decimal point even if they are ZERO figures.

 

<?php 
$ListFee = "58.00";
$BorderFee = "12.00";

$TotalAmount = ($ListFee + $BorderFee);

echo $TotalAmount;
?>

 

the output gives me 70

I want 70.00

 

Many thanks in advance again

VoodooJai

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.