How to use a php variable in an external javascript code?
<p>Usually, when i need to use some php in javascript code, i use to put the code into the head like this :</p>

<pre><code>&lt;script&gt;
    $(function() {

    $("input#datepicker").val('&lt;?php echo $date ?&gt;');
});
&lt;/script&gt;
</code></pre>

<p>This way, i can use some php variables in javascript code. It works fine.</p>

<p>Do you know how to do this if i want to put all javascript code in an external js file :</p>

<pre><code>&lt;script type="text/javascript" src="js/admin.js"&gt;&lt;/script&gt;
</code></pre>

<p>Maybe it doesn't matter at all. But i use to code in an external js file and and i'm wondering if it's possible to do that.</p>
