how to insert variable value in query?
<p>I want to edit following code.(This code is come from [http://stackoverflow.com/a/9280414/945688]  </p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;image&lt;/title&gt;        
  &lt;/head&gt;
  &lt;body&gt;

    &lt;img id="img" src="1.jpg" /&gt;

    &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      var interval = null;
      function changeImage(){
        var nextNum = parseInt($('#img').attr('src').replace('.jpg',''), 10) + 1;
        // If you want it to repeat back to 1 after 5
        nextNum = nextNum &gt; 5 ? 1 : nextNum;
        $('#img').attr('src', nextNum+'.jpg');
      }

      $('#img').hover(
        function(){
          // Call change Image every 50ms
          interval = setInterval(changeImage, 50);
          changeImage();
        },
        function(){
          // Stop the call
          interval &amp;&amp; clearInterval(interval);
        }
      );
    &lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;​​​​​​​​​​​​
</code></pre>

<p>The above code is fine work.But I want to substitute in image path.</p>

<p>If</p>

<pre><code>    &lt;?php $image_folder_path='imagenewfolder';?&gt;
&lt;img id="img" src="images/&lt;?php echo $image_fold_path; ?&gt;/1.jpg&gt;
</code></pre>

<p>,How to edit jquery code .</p>
