title: Don't show blank spaces
body: <p>I use an SQL query from PHP code to display fields of a database on a website. Is there a way to delete the blank spaces (whitespaces) in the output of empty (NULL) fields?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php 
      $sql = "SELECT * FROM dining ORDER BY date DESC LIMIT 0, 3";
  
      $dining = new Database($sql);
      while($dining-&gt;results()){
  
      echo "          
                      &lt;span class='date'&gt;". date("F jS, Y", strtotime($dining-&gt;date)) ."&lt;/span&gt;
  &lt;h3&gt;&amp;nbsp;$dining-&gt;title&lt;/h3&gt;
  &lt;h4&gt;&amp;nbsp;$dining-&gt;Comforts&lt;/h4&gt; 
  &amp;nbsp;$dining-&gt;com1&lt;br/&gt;
  &amp;nbsp;$dining-&gt;com2&lt;br/&gt;
  &amp;nbsp;$dining-&gt;com3&lt;br/&gt;
  &amp;nbsp;$dining-&gt;com4&lt;br/&gt;
  &amp;nbsp;$dining-&gt;com5&lt;br/&gt;
  &amp;nbsp;$dining-&gt;com6&lt;br/&gt;
  &lt;h4&gt;&amp;nbsp;$dining-&gt;Breakers&lt;/h4&gt;
  &amp;nbsp;$dining-&gt;break1&lt;br/&gt;
  &amp;nbsp;$dining-&gt;break2&lt;br/&gt;
  &lt;h4&gt;&amp;nbsp;$dining-&gt;Wild&lt;/h4&gt;
  &amp;nbsp;$dining-&gt;wild1&lt;br/&gt;
  &amp;nbsp;$dining-&gt;wild2&lt;br/&gt;
  &lt;h4&gt;&amp;nbsp;$dining-&gt;Tureens&lt;/h4&gt;
  &amp;nbsp;$dining-&gt;tur1&lt;br/&gt;
  &amp;nbsp;$dining-&gt;tur2&lt;br/&gt;
  &amp;nbsp;$dining-&gt;tur3&lt;br/&gt;
  &lt;h4&gt;&amp;nbsp;$dining-&gt;Desserts&lt;/h4&gt;
  &amp;nbsp;$dining-&gt;des1&lt;br/&gt;
  &amp;nbsp;$dining-&gt;des2&lt;br/&gt;
  &amp;nbsp;$dining-&gt;des3&lt;br/&gt;
  &amp;nbsp;$dining-&gt;des4&lt;br/&gt;&lt;br/&gt;
  ";  
  }
  ?&gt;
  </code></pre>