title: echo out image variable in conditional statement
body: <p>Im trying to display an image in a conditional statement.</p>
  
  <p>Without the condition I can simply do:</p>
  
  <pre><code>&lt;div&gt;
      &lt;img src="&lt;?php echo($img); ?&gt;" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But lets say that i have condition like this:</p>
  
  <pre><code>&lt;?php
      if ($img ) {
         echo "image exists";
  
          // Show image
  
          } else {
          echo "no image..";
  
          }
  ?&gt;
  </code></pre>
  
  <p>I am using wordpress and the <code>$img</code>contains a url.
  Help appreciated. Thank you!</p>