0
Can php and JavaScript be used in the same page
5 Answers
+ 2
Yes.
PHP is for server side processing.
JavaScript is for client side and runs in the browser.
+ 2
Yes we can use but there is no interaction between the php code and js code js code interacts with the HTML code present in the page
+ 1
of course. if you want to "connect" this languages you can use ajax. google it
+ 1
You can use php to create dynamic javascript
0
If your file extension is .php , you can echo the Javascript. Make sure it is inside <script></script> though.