title: PHP: Is there a correct method for saving configuration data?
body: <p>I have a <code>config.inc</code> file in a web application that I am building.  It contains an array with configuration values for things like the MySQL database, etc.  I would like these to be entered by using a simple form, that asks for the server, login/password for the database, etc, then these get written to the configuration file.</p>
  
  <p>Is there a preferred method of doing this?  I am not sure how to write to a file, and update an array.</p>