I have a script that calculates the total of values and then shows the total value in an echo. The problem is that the value is shown without any semicolons, eg: 82700 to: 827.00 I would like to convert it to decimal number but it still is not working.
<?php // Make a MySQL Connection $con = mysql_connect('', 'flash548_passhms', 'passhms');
if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db("flash548_passhms", $con);
$query = "SELECT month, SUM(overhead) FROM projections_sample GROUP BY month";
$result = mysql_query($query) or die(mysql_error());
// Print out result
while($row = mysql_fetch_array($result)){
echo "Despesas". $row['month']. " R$". $row['SUM(overhead)']; //overhead
echo "<br />";
}
?>