title: PHP - If null value
body: <p>I have the following coding:</p>
  
  <pre><code>&lt;div class="product-top-icons"&gt;
    &lt;div class="energy-rating-1"&gt;&lt;img src="http://www.justhome.co/skin/frontend/default/just2011/images/assets/&lt;?php echo $_product-&gt;getAttributeText('energy_rating_one');?&gt;.jpg"&gt;&lt;/div&gt;
    &lt;div class="energy-rating-2"&gt;&lt;img src="http://www.justhome.co/skin/frontend/default/just2011/images/assets/&lt;?php echo $_product-&gt;getAttributeText('energy_rating_two');?&gt;.jpg"&gt;&lt;/div&gt;
    &lt;div class="energy-rating-3"&gt;&lt;img src="http://www.justhome.co/skin/frontend/default/just2011/images/assets/&lt;?php echo $_product-&gt;getAttributeText('energy_rating_three');?&gt;.jpg"&gt;&lt;/div&gt;
    &lt;div class="guarantee-icon"&gt;&lt;img src="http://www.justhome.co/skin/frontend/default/just2011/images/assets/&lt;?php echo $_product-&gt;getAttributeText('warranty');?&gt;.jpg"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would like to add an if statement in there basically to say the following:</p>
  
  <p>If the value in the <code>'energy_rating_one'</code> attribute is null then don't display the division <code>energy-rating-1</code>, if the <code>'energy_rating_two'</code> attribute is null then don't display the div <code>energy-rating-2</code> and so on...</p>