php if statement to check if field is empty
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1591611/how-to-check-if-mysql-entry-is-empty-in-php">How to check if mysql entry is empty in PhP?</a>  </p>
</blockquote>



<p>I'm trying to run a seemingly simply if statement, however, my PHP skills are not that great. </p>

<p>I am querying data from a single MySQL table and I want to run a statement that detects if a field is empty or not, if it's not I want it to display something, if it is, to not display anything.</p>

<p>Also, I'm not sure if it's possible to put this in an echo or not?</p>

<p>EDIT:<strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**</strong>
Here's the code to make things easier:</p>

<p>I may have done something wrong. Here is my code to explain things a little easier</p>

<p>'

<pre><code>if (!$result) {
    exit('&lt;p&gt;Error performing query: ' . mysql_error() . '&lt;/p&gt;');
}
//creating the table w/ headers
echo '
&lt;table&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            ...
            &lt;th style="width:90px"&gt;&lt;strong&gt;&lt;a href="other-items.php?order=oc_retailer"&gt;Retailer&lt;/a&gt;&lt;/strong&gt;&lt;/th&gt;
            &lt;th style="width:90px"&gt;&lt;strong&gt;Files&lt;/strong&gt;&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;';  
// Display each item
  while ($row = mysql_fetch_array($result)) {
  echo '
    &lt;tr&gt;
        ...
        &lt;td style="width:90px"&gt;' . $row['oc_retailer'] .'&lt;/td&gt;
        &lt;td style="width:90px"&gt; this is where I want to if statement to go&lt;/td&gt;


              ';
  }     
  echo '&lt;/table&gt;';

  ?&gt;'
</code></pre>
