PHP echo text if variable is blank

Posted by user342391 on Stack Overflow See other posts from Stack Overflow or by user342391
Published on 2010-05-23T20:45:40Z Indexed on 2010/05/23 20:50 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

I am trying to echo €00.00 if my variable $amount equals zero

I have done something wrong can you help??

Code

while ($row9 = mysql_fetch_array($result9))
{
$amount = $row9['amount'];
}
//$amount = $amount / 60;
//$amount = round($amount, 2);
if $amount == 0 echo "<b>Balance: &#8364;00.00</b>";
else
echo "<b>Balance: $$amount</b>";

© Stack Overflow or respective owner

Related posts about php

Related posts about error