Question : How do I display &nbsp or nothing for a certain field value in a PHP/MySQL query?

I have a field in my MySQL database named 'denom' (for denomination); I'd like its value to NOT display in my results if the value is "not specified" or "other." Below is my attempt (I readily confess I'm not very good at this.) The problem is that the resulting page displays the text "not specified" in addition to (immediately following) the
1:
 
. What should i do?

1:
2:
3:
4:
5:
6:
7:
8:
   		if($row["denom"] == "not specified")
				echo ' ';
			elseif($row["denom"] == "Other")
				echo ' ';
            else
				echo '<br>';
                                echo $row["denom"];

Answer : How do I display &nbsp or nothing for a certain field value in a PHP/MySQL query?

$row["denom"]=trim(strtolower($row["denom"]));

if($row["denom"] != "not specified" && $row["denom"] != "other")
echo $row["denom"];
else
echo "&nbsp;";

hope this helps
Random Solutions  
 
programming4us programming4us