Use php var in js file : <p>I've been looking, but found nothing similar to my case.</p>

<p>I want my php variable $money , to pass onto my javascript file.</p>

<p>Example :</p>

<pre><code>** FILE index.php ** 
&lt;?php $money = 15; ?&gt;

&lt;div id="div-test"&gt; Foo foo&lt;div&gt;

&lt;script src="test.js"&gt;&lt;/script&gt;


** FILE test.js ** 
document.getElementById("div-test").innerHTML = $money;
</code></pre>

<p>How would i make this possible?</p>
