• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

What's the difference between javascript and php?

watdahel

Golden Member
Can't you pretty much do anything with one or the other? I'd hate to learn so many languages when I can just master one that can do it all.
 
PHP is scripting language used mostly on the server side to spit out dynamic content. Javascript is client side scripting language, which among other things allows manipulation of DOM elements within the page.
 
Languages such as PHP/ASP/Python/Perl reside on the web server itself, and spit out all the dynamic content via HTML which is read & displayed by the browser. Modern websites usually have a SCRIPT element that links to an external javascript file which controls the behavior of the website. Javascript should be treated like icing on a cake, never rely on it (well an exception would be if you wanted to make a 100% js application such as Gmail/Google Maps) but on a regular website you should never rely upon JS being there, since it can easily be disabled (some (govt?) companies do this).
 
javascript runs on the client. there is some overlap between them as far as what you can use to do a certain thing, but the main thing is that java script is processed on the client.
 
Back
Top