How to use Javascript in PHP?

how can i use java scripts in PHP

Replies

  • Ankita Katdare
    Ankita Katdare
    #-Link-Snipped-# What is it that you want to do? Please ask specific questions.
    Else this will help -
    Using PHP and Javascript together – iTamer
  • siraj.mussafirr
    siraj.mussafirr
    Make clear the question. Do you want to load a php file and run javascript on the client browser ? Or do you wish to run javaScript at Server side?
  • Arul Prakash
    Arul Prakash
    want to load a php file and run javascript on the client browser
  • Uday Bidkar
    Uday Bidkar
    Whatever you write outside the php delimiters (most commonly used open/close delimiters are "") does not get processed by the PHP processor at server end and gets sent directly to the client as it is. So you can embed the javascript directly in your PHP file or can also point to external js file as you would do in plain HTML, outside the PHP delimiters
  • siraj.mussafirr
    siraj.mussafirr
    Just print out the link for JS in the same way you do with HTML.

    This is a basic code snippet this would probably do:
    echo "