summaryrefslogtreecommitdiffstats
path: root/frontends/php/latest.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/latest.php')
-rw-r--r--frontends/php/latest.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/php/latest.php b/frontends/php/latest.php
index ca8ca681..52b93ad7 100644
--- a/frontends/php/latest.php
+++ b/frontends/php/latest.php
@@ -299,12 +299,16 @@
// sprintf("%+0.2f"); does not work
if($row["lastvalue"]-$row["prevvalue"]<0)
{
- echo "<td>";echo convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]); echo "</td>";
+ $str=convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]);
+ $str=str_replace(" ","&nbsp;",$str);
+ echo "<td>$str</td>";
// printf("<td>%0.2f</td>",$row["lastvalue"]-$row["prevvalue"]);
}
else
{
- echo "<td>+";echo convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]); echo "</td>";
+ $str="+".convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]);
+ $str=str_replace(" ","&nbsp;",$str);
+ echo "<td>$str</td>";
// printf("<td>+%0.2f</td>",$row["lastvalue"]-$row["prevvalue"]);
}
}