PHP Get Contents and Include Not Quite What I Need
<p>I've got a function like:</p>

<pre><code>function get_div(){

   $fileLocation = 'form.php';
   $returnString = '&lt;div id="myDiv"&gt;' . get_php_file($fileLocation) . '&lt;/div&gt;';

   echo $returnString;

}

function get_php_file($file){
   return file_get_contents($file);
}
</code></pre>

<p>the problem is I have PHP in that file that I want executed as if it were part of the script.  (Instead of outputting <code>&lt;?php my_function() ?&gt;</code> throughout my page)</p>

<p>If I use <code>include $file</code> instead of <code>file_get_contents()</code> I end up with the included file, but the rest of my <code>$returnString</code> is shot... </p>

<p>Thoughts?</p>
