View Full Version : php or javascript

03-17-2010, 12:40 AM
i wanna start moving on to something new and different. im deciding between javascript or php. i dont really know which one to start with though. is javascript easier?

03-17-2010, 01:07 AM
Javascript is processed locally, on your PC ... using your browser.
So, it's easy to learn because you can code and test offline.
Javascript is a "client-side" scripting language. You can't affect any files,
or process any files online (on your website).

PHP is a server-side scripting language. That means you need to upload
your script to your webhost and test online (unless you have your own server).
That makes it a tiny bit harder to experiment, but PHP is totally different than
Javascripting. With PHP, you have file and database control over your website
files. That of course is what makes it so powerful.

ANY programming language you learn (PHP, Perl, C++, Visual Basic, BASIC, Javascripting),
is beneficial to your future. You will learn the structure and flow of a program, how
variables and arrays work, how functions work, etc. That is the same across all

Use Google for free information, tutorials, and examples.

03-17-2010, 01:24 AM
well i plan on learning them both, but im just undecided which to do 1st.
javascript seems easier, but php seems like it can do more things. i dont know lol. i have xampp installed so i can test php files on my computer without having to upload them to a host server.

03-17-2010, 01:46 AM
Learn PHP then .... Javascripting is easy to learn after you get PHP.

03-17-2010, 02:06 AM
PHP for server side scripting and Javascript for client side scripting, (usability enhancements).

03-17-2010, 02:16 AM
What programming experience do you currently have? Languages you're adept with? What do you want to "do"? I might not recommend PHP at all, but maybe Python or Ruby.

It's tough nowadays to work on any web project without running across JavaScript in some form. It's going to remain a staple in the web dev's toolkit.

Not to come off like a Crockford fanboy, but I highly recommend anything by Doug Crockford; there's alot of really good lectures on JavaScript, Ajax and the web he's done over the years.

YUIblog.com : Crockford (http://yuiblog.com/crockford/) (new lectures)
YUI theatre : "crockford" search results (http://search.yahoo.com/search?va=crockford&vs=developer.yahoo.com&vs=developer.yahoo.net)
JavaScript : The Good Parts (http://oreilly.com/catalog/9780596517748)
crockford.com : JavaScript (http://javascript.crockford.com/)

03-22-2010, 08:24 AM
JavaScript is mainly used as client side scripting language, while PHP is a server side technology. PHP doesn't have tools to make it work client side. so you need to combine JavaScript and PHP scripts to develop powerful web-applications.
So, learn PHP and Java Script for developing web applications.