title: How do I skip an item in while loop if variable empty?
body: <p>I'm trying to figure out how to skip printing a row from a MySQL table if the variable is empty. For instance, I have a table full of information. I have a while loop that echos the result. How can I skip an entry if a variable is empty?</p>
  
  <p>For instance, can I cancel the echo if 'tweet1' is empty in the row?</p>
  
  <pre><code>mysql_connect ($DBsever, $DBusername, $DBpass) or die ('I cannot connect to the database becasue: '.mysql_error());
  mysql_select_db ("$DBname");
  
  $query = mysql_query("SELECT * FROM $DBtable ORDER BY time");
  
  while ($row = mysql_fetch_array($query)) {
      echo "&lt;br /&gt;&lt;strong&gt;".$row['time']." ".$row['headline']."&lt;/strong&gt;&lt;br/&gt;".$row['description']."&lt;br /&gt;".$row['story1']." &lt;a href=".$row['link1']." target='_blank'&gt;".$row['link1']."&lt;/a&gt; ".$row['tweet1']."&lt;br /&gt;";}
  </code></pre>