title: How to set a variable inside script tag
body: <p>I have a page name index.php. And I have a script variable as follows at the top of the page:</p>
  
  <pre><code>&lt;script&gt;
      var search_quarry = "some_test";
  &lt;/script&gt;
  </code></pre>
  
  <p>At the bottom of the same page I want to add this variable into the <code>src</code> attribute of a script tag:</p>
  
  <pre><code>&lt;script src=NEED_TO_ADD_HERE&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This doesn't work:</p>
  
  <pre><code>&lt;script src=search_quarry&gt; &lt;/script&gt;
  </code></pre>
  
  <p>Can anyone please tell me how to do this?</p>