Difference between PHP and JavaScript

+1 abhishek phukan · March 8, 2015
I want to know what is the actual difference between PHP and JavaScript..I know that PHP is a server side scripting and JavaScript is a client...i know that kind of information..i want a real world explation..can anyone provide it..is there any actually a difference between these languages or the both programming language can be used for same purpose.I mean does a programmer need to learn both the language or the programmer should go for only one above mentioned language and will serve his/her purpose.

Thank You..:)

Post a Reply

Replies

Oldest  Newest  Rating
+3 nmelssx nmelssx · October 6, 2015
Both language CANNOT do the same basic thing. They have both similar and different functions. For example. PHP is use to get data from the database, and JavaScript CANNOT do that. When saving a session, PHP saves the session on the server, while JavaScript saves the session on the cookies of the user's computer. JavaScript can do a variety of other things that PHP can't.  For example, JavaScript can get the width and height of the user's screen, while PHP can't. JavaScript allows for languages like AJAX to exist. Ajax can update parts of the website without updating the whole website, and most modern websites use it. And there are more, but this is the gist of it.
0 pen gie · October 6, 2015
I've wondered the same question, then i found an interesting link below. it's clear and i hope it will help u
https://storify.com/Bsscommerce/the-best-language
0 Casper Hollemans · October 7, 2015
PHP = handling information
JavaScript = make a site interactive
0 Casper Hollemans · October 7, 2015
@Raahim a lmgtfy answer is not really a good answer.
You could at least tell him what you googled or something else so he actually learns something from you answer.
  • 1

PHP

107,329 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators