title: Echo PHP in Javascript?
body: <p>I have see numerous examples of this but none give the answer how to change 'buynow' with php echo. 
  htlm code</p>
  
  <pre><code> &lt;button id="pn4" class="paynow-button"
          data-business="example@gmail.com"
          data-item_name="PayNow Plugin"
          data-amount="150"
          data-quantity="1"
          data-currency_code="USD"&gt;
          &lt;span class="paynow-label"&gt;Click to Buy &lt;/span&gt;
          &lt;span class="paynow-price"&gt;&lt;sub&gt;$&lt;/sub&gt;150&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>Js code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#pn4').paynow({
              type: 'buynow', 
              style: 'double',
              tooltip: 'Click to checkout with PayPal!'
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I have added this code but no result.</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#pn4').paynow({
              type: '&lt;?php echo $detail['my_name']; ?&gt;', 
              style: 'double',
              tooltip: 'Click to checkout with PayPal!'
          });
      });
  &lt;/script&gt;
  </code></pre>