title: How do i use PHP to edit a variable in another PHP script?
body: <p>I am currently in the progress of making a basic PHP app/page, However, I have run into a problem. I have needed to make a script which will edit a variable in another script and set it to something.</p>
  
  <p>For example, One script would say:</p>
  
  <pre><code>$test = "username";
  </code></pre>
  
  <p>And the other script would set that variable to something else.</p>
  
  <p>So, Once the PHP script's (index.php) page is loaded, The PHP script will change the first script (variables.php) to:</p>
  
  <pre><code>$test = "username20";
  </code></pre>
  
  <p>However, I do not know how to do this. Is there any possible way that I could do this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I need a basic auto-editor like this because the file is a configuration file (So basically, I need the text inside to be there permanently, Meaning that a "Session" will not work.).</p>
  
  <p>Thank you if you can help.</p>