PHP and JS question when is php code called?

Hey...Question about JS functions.

So If I have a .php file which has a few javascript functions in it...is the php code that is INSIDE the js function only called when the JS function is called?

so lets say within the js code I have say <?php echo total();?> //PHP FUNCTION

will that be called when ever the document is run, or jsut when the JS function is called?

Thanks!
 


Write your reply...
Back
Top