How can i insert this javascript code to a php file

Discussion in 'Programming' started by haveseo, Nov 10, 2012.

  1. #1
    How can i insert this javascript code to a php file?
    <script src="http://www.example.com/index.php?section=serve&id=1&output=js</script>
    Code (markup):

     
    haveseo, Nov 10, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    ?><script..../script><?php

    this way.
     
    EricBruggema, Nov 11, 2012 IP
  3. arsalankhan

    arsalankhan Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    6
    Trophy Points:
    0
    #3
    or

    echo '<script src="http://www.example.com/index.php?section=serve&id=1&output=js</script>';
     
    arsalankhan, Nov 11, 2012 IP