title: calling a file inside another file in php
body: <p>Is there a way in PHP to include or execute code from a separate file?</p>
  
  <p>For example, if we have 2 files:</p>
  
  <p><strong>a.php</strong> which contains:</p>
  
  <pre><code>&lt;?php echo "i'm a.php"; ?&gt;
  </code></pre>
  
  <p>and <strong>b.php</strong> which contains:</p>
  
  <pre><code>&lt;?php 
  echo "i'm b.php";
  // some code here to "execute" a.php so that it prints i'm a.php as the output.
  ?&gt;
  </code></pre>
  
  <p>When b.php is run it should display:</p>
  
  <pre><code>i'm b.php
  i'm a.php
  </code></pre>