Jump to content

[SOLVED] simple if statement not working


gwood_25

Recommended Posts

Hi, I am new to php and am having a problem with a simple if statement. I am loading a float value from a database and if it is greater than zero, I would like to ouput the value. If not, display nothing. Here is my code but it doesn't work....

 

<?

 

...database code above works...when I add the following if statement...the code fails

 

if ($row{'Price'} > 0)

{

  echo $row{'Price'}

}

?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/71380-solved-simple-if-statement-not-working/
Share on other sites

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.