title: Writing to a PHP file using PHP code?
body: <p>Is it possibile to write a regular PHP file using the PHP language itself?<br>
  Is it the same as writing a .txt file?<br>
  Or is there something else I should know? </p>
  
  <p>Whenever I save a record into a database, I want to overwrite the same file <code>myConfig.php</code> and it should contain something like this:</p>
  
  <pre><code>&lt;?php
  
       $myVar = "myValue";
  
  ?&gt;
  </code></pre>