Question:

What's better in your opinion-PHP or Javascript?

by  |  earlier

0 LIKES UnLike

Can PHP do everything Javascript can do? What do you think is better to "master"

 Tags:

   Report

6 ANSWERS


  1. My best advice is to use both.  And if your learn both you could use AJAX, which combines both the powers of PHP and Javascript.


  2. It depends on what you want to do. Javascript is good and making things look nice and doing clever things on the page. However, PHP is better for databases and user sessions etc. I decided to learn PHP well and have knowledge of Javascript. That way I can do most of my coding in PHP and then if I need to do something fancy, look it up in Javascript.

  3. Since PHP is a server side scripting language it will allow you to get your website to do what you want it to do whether the person viewing it has javascript enabled or not.

    Javascript on the other hand, even though it is easier to learn, can be disabled in the browser settings and then whatever you are trying to get your site to do will not happen. Also, javascript works differently in different browsers and in different operating systems, so your site will not act the same way for all users.

    For the most cross browser capability, PHP is the way to go. You just have to ensure that your web host has the post current version to make sure that everthing you code in PHP will work on your site.

  4. for a career go with java script but for a hobby php is where it is at

    http://bitsandbytescomputers.sytes.net

  5. What is best, a car or a house?

    Php and javascript are two fundamentally different things, for two fundamentally different purpose, running on two fundamentally different platforms!!!

    Javascript is a "script" (or program) that runs on the CLIENT's machine (the surfer), while Php is a server-side "script" (or program) that runs on the SERVER.

    Javascript is pretty limited in functionality, as it has no access to the ressources that are on the server, while Php has HUUUUGE ressources by itself.

    I would say that you can do anything you want with Php, while you can just say "Hello world" with javascript (a bit more, of course: this is a metaphore).

    Which one to master?

    BOTH: you can't design any "web 2.0" website with only one of them!

    In fact, you can become a powerful web developer with ONLY:

    HTML, javascript, Php, MySQL and Sajax (AJAX for Php)... and Notepad++ as your editor.

  6. The two languages function in completely different manners

    PHP is server-side

    PHP is used to process forms, pages, information, users, generally make the pages more dynamic by connection to a host of related functions.

    Javascript is client-side

    Javascript is used more for the look and whiz bang of a page.

    The two languages compleely differ but they can work well with each other

    Look at the use of Ajax

    Look at the use of Jquery

    I think you will find them useful

Question Stats

Latest activity: earlier.
This question has 6 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.