title: PHP variable is not accessible in HTML template
body: <p><strong>index.php</strong></p>
  
  <pre><code>&lt;?php 
  $title = "World";
  echo loadTemplate();
  ?&gt;
  </code></pre>
  
  <p><strong>Template.php</strong></p>
  
  <pre><code>&lt;?php
  function loadTemplate(){
      return &lt;&lt;&lt;EOF
      Hello {$title}
      EOF;
  }
  ?&gt;
  </code></pre>
  
  <p>On running <strong>index.php</strong> it should output <code>Hello World</code> but its only printing <code>Hello</code>. How can I make my script echo <code>Hello World</code>?</p>