How to insert Javascript into PHP?

by 3 replies
4
I have a WordPress(Thesis theme) blog & need a proper(tested & functional) PHP script to fit the following Javascript into: <!-- Start Alexa Certify Javascript -->
<script type="text/javascript" src="https://d31qbv1cthcecs.cloudfront.net/atrk.js"></script><script type="text/javascript">_atrk_opts = { atrk_acct: "VUbye1aoOI000A", domain:"guyasmith.com"}; atrk ();</script><noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=VUbye1aoOI000A" style="display:none" height="1" width="1" alt="" /></noscript>
<!-- End Alexa Certify Javascript -->
#programming #insert #javascript #php #thesis wordpress theme #wordpress 3.5
  • Why do you need php to insert javascript?

    How about just inserting the javascript in the html with any php?
  • i have solution for your problem
    please visit
    http://phproots.com
  • Banned
    Just use the escape character for each quote in the javascript then copy/paste that into print("[code-here]"); in PHP.

Next Topics on Trending Feed

  • 4

    I have a WordPress(Thesis theme) blog & need a proper(tested & functional) PHP script to fit the following Javascript into: <!-- Start Alexa Certify Javascript --> <script type="text/javascript" src="https://d31qbv1cthcecs.cloudfront.net/atrk.js"></script><script type="text/javascript">_atrk_opts = { atrk_acct: "VUbye1aoOI000A", domain:"guyasmith.com"}; atrk ();</script><noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=VUbye1aoOI000A" style="display:none" height="1" width="1" alt="" /></noscript> <!-- End Alexa Certify Javascript -->