vinpkl, also remember that the database value NULL when retrieved by PHP becomes the PHP NULL value and not the “NULL” string. Therefore your condition as you presented will not work:
$row['price'] != "NULL"
Instead, you should write it like this:
$row['price'] !== NULL
This way you will strictly exlude NULL values.
But in PHP you can achieve your goal in a much simpler syntax because of default type casting of values:
if($row['price'] != 0) {
// DISPLAY PRICE
}
This will display the price if it is not “0.00” or if it is not NULL, because in PHP using weak comparison (!= and ==) NULL equals 0, and string “0.00” equals 0. Only when you use strong comparison (!== or ===) then NULL does not equal 0 and string “0.00” does not equal 0.