如果我的变量$amount等于零,我希望能够输出€00.00。
我做错了什么,你能帮忙吗?
代码:
while ($row9 = mysql_fetch_array($result9))
{
$amount = $row9['amount'];
}
//$amount = $amount / 60;
//$amount = round($amount, 2);
if $amount == 0 echo "<b>Balance: €00.00</b>";
else
echo "<b>Balance: $$amount</b>";
amount
为'0.00'
,if (!$amount)
将被评估为false
。 - webbiedave