0
What is the difference between PHP and Javascript?
I'm learning both PHP and Javascript as a beginner. As I know, they both can be used to make the contents of website dynamic. so why two subjects? What is the difference? Thanks.
4 Answers
+ 7
While JS is used for client side scripting (except in node.js) and PHP is used for server side scripting. Simply, JavaScript codes are executed by your web browser, like the catchy animations or simple calculations . Your browser does all the processing. While PHP runs on the server, where your webpage is stored.
+ 2
php is server side. it runs on programmers computer. generally used as backend language along with sql.
java script runson users browser
it is helpful in determining page layout and animations on page.
decision of wheter a person should log in and collecting all users is work of php
+ 2
with reference to node.js this functions like php but not the same as its like an admin octopus on a merry go round never stopping just handling code. Taking it out of the queue and runing it then ready to go again. the .js at the end of node.js stands for Javascript as its written using Javascript.
+ 1
no buddy.... JavaScript is used to make...web pages dymanic...but...php is used at back end...like..ways to store data..like searching..all the background process...is using php...