Using PHP variables with file_get_contents
<p>I have a newsletter template in one file and a mail script in another file which basically pulls email addresses from a database and loops through each one sending the email to them.</p>

<p>I am using this code to get the contents of the newsletter template:</p>

<pre><code>$content = file_get_contents('attach/T_newsletter.php');
</code></pre>

<p>What I need to do now is send PHP variables along with this eg:</p>

<pre><code>T_newsletter.php?test=hello
</code></pre>

<p>and then be able to pull them from the URL in the template and adjust the content accordingly.</p>

<p>Could someone explain how I would do this please?</p>

<p>Thanks for any help</p>
