Get php url variable for use in jquery
<p>Okay so I have an html5 audio player that i built with jquery however i need to get the track url from the variable in the url with a get request so that it can then be used in the jquery script. Not sure how to do it. I have the jquery in a seperate file to the markup for easy embedding for users. The url will look like www.mysite.co.uk/player/player.html?url=testing123.mp3.</p>

<p>I can easily get the variable for use in the markup to show the name of the artist etc with PHP but not sure how to do it for the jquery script. I have had a look around but no luck.</p>

<p>Heres the relevent jquery</p>

<pre><code>song = new Audio('THIS IS WHERE THE GET VARIABLE NEEDS TO BE');
</code></pre>

<p>I shouldnt think anymore code is needed but if it is just ask.</p>

<p>head</p>

<pre><code>&lt;script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"&gt;&lt;/script&gt;

&lt;?php $url = $_GET['url']; ?&gt; 

&lt;script&gt; // Before jQuery
    var song = new Audio(`&lt;?php echo($url); ?&gt;`);
&lt;/script&gt;`
&lt;script type="text/javascript" src="http://newbornsounds.co.uk/player/src/js/js.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://newbornsounds.co.uk/player/src/js/html5slider.js"&gt;&lt;/script&gt;
</code></pre>
