title: How to create .php files using php fwrite?
body: <p>i want to create a config.inc.php file. which I am able to do. with just one problem. I can't create variables in the created PHP file.</p>
  
  <p>here's what I did. </p>
  
  <pre><code>&lt;?php 
  $f = fopen('config.inc.PHP' , 'w');
  fwrite($f, '&lt;?php  $name = "odd";?&gt;'); 
  ?&gt;
  </code></pre>
  
  <p>the file is created fine but with an $name is an undefined variable error message and in the config.inc.PHP file u only see </p>
  
  <pre><code>     &lt;?php =" odd "; ?&gt;. what can I do?
  </code></pre>