How can I load static configuration information
<p>In my code, I use JavaScript for UI and PHP for back end. I also use PHP to store application settings and sometimes my UI code needs to access this information. My configuration file looks something like this (config.php):</p>

<pre><code>$resolution_x = 1920;
$resolution_y = 1080;
etc...
</code></pre>

<p>When I need to access any of these settings form JavaScript, i simply use</p>

<pre><code>&lt;?php echo ... ?&gt;
</code></pre>

<p>to substitute the value directly, but it just doesn't strike me as very robust.</p>

<p>Are they any dangers of doing this that I am not aware of? Is there a better way of doing this? </p>

<p>Thank you,</p>
