title: How to run a function within an echo call
body: <p>This is a quick but simple question. I am having a bad day and don't know how to do this:</p>
  
  <p>What I need to do is this...</p>
  
  <p>I am checking for PMD in the url if so echo this:</p>
  
  <pre><code>&lt;?php 
          if ( isset($_GET['pmd']) ) { 
            echo"&lt;div class=\"response\"&gt;&lt;p style=\"width:350px; height:200px; vertical-align:middle;\"&gt;&lt;strong&gt;Thank you for acting as a &amp;quot;watchman on the walls&amp;quot; of Jerusalem! Your name will now appear on our virtual wall.&lt;br&gt;&lt;br&gt;You can also catch up on the latest news from Israel by visiting our news feed below.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;";
          }else { etc...
  </code></pre>
  
  <p>What I need to include within that is an image like such that is firing off a tracking pixel.</p>
  
  <pre><code>&lt;img src="url.com?cid=12345&amp;aid=1234&amp;oid=&lt;?php echo mt_rand(); ?&gt;&amp;quantity=1" height="1" width="1" /&gt;
  </code></pre>
  
  <p>What I would like to have is:</p>
  
  <pre><code>&lt;?php 
          if ( isset($_GET['pmd']) ) { 
            echo"&lt;div class=\"response\"&gt;&lt;p style=\"width:350px; height:200px; vertical-align:middle;\"&gt;&lt;strong&gt;Thank you for acting as a &amp;quot;watchman on the walls&amp;quot; of Jerusalem! Your name will now appear on our virtual wall.&lt;br&gt;&lt;br&gt;You can also catch up on the latest news from Israel by visiting our news feed below.&lt;/strong&gt;&lt;/p&gt;
            &lt;br /&gt;
            &lt;img src="url.com?cid=12345&amp;aid=1234&amp;oid=&lt;?php echo mt_rand(); ?&gt;&amp;quantity=1" height="1" width="1" /&gt;
            &lt;/div&gt;";
          }else {
  </code></pre>
  
  <p>What do I need to do to get that mt_rand() function to fire?</p>
  
  <p>Thanks,</p>
  
  <p>Matt</p>