Why you should learn PHP after HTML, CSS, and JavaScript

Published by | Saturday, May 12th, 2012
PHP in Action using my iPad

PHP in Action using my iPad

Earlier in my design career I read an insightful book by Roger Black called Websites that Work. One of his rules of design was that after black and white, red was the third color. White is the brightest color, and black has the most contrast to white, but red is the color that gives you the most bang for the buck if you’re looking to get your text noticed. That three-color premise makes me think back to development languages—specifically, which are important, why they are important, and in what order they should be approached.

I’m a big fan of PHP, and much like red, I think it’s the language that will give you the biggest bang for your learning buck. I propose that after you learn HTML/CSS, the next thing you should learn is JavaScript, and the third thing you should learn is PHP. You might argue that HTML and CSS are two different things, but I see them as the key semantic and layout combination of the web, so I consider them one item bundled together.

So what is PHP, and why should I learn it third?

PHP is a server-side language with files that are processed before they are sent to a client computer. It’s easily available in even the cheapest shared hosting servers and runs some of the biggest web sites on the Internet including Facebook. PHP also serves as the engine for most blogging platforms, including WordPress.

Some may argue that learning something like node.js is an easier transition from JavaScript, and I will admit, the superior object-oriented structure of Python and the MVC frameworks like Rails might be tempting, but to me, PHP is a the language for getting things done. If you already know JavaScript, the syntax is eerily similar so you can get going quickly.

If you’re into an MVC structure, there are plenty of frameworks available for the PHP language. To get started, I’d recommend checking out Drew Flakman‘s PHP frameworks course, MVC Frameworks for Building PHP Web Applications.

Using PHP hands-on

In this week’s episode of View Source, I wanted to show you a technique that I use often with PHP—creating a folder where people can drop photos, and then using PHP with jQuery to build a slideshow of the photos dropped into that folder. When it’s done, all you have to do is drop a new photo into a folder to update your slideshow, and your site will automatically update with the new content. It’s how I update the photos on the blog for View Source, and I’ve used the same technique to add elements like audio and PDF links to web sites before. With this technique, you can easily teach someone how to update a web site by simply dropping files into a folder.


Interested in more?
• The full View Source weekly series on lynda.com
• All web + interactive courses on lynda.com
• All courses from Ray Villalobos on lynda.com

Suggested courses to watch next:
PHP for Web Designers
• Create an Interactive Video Gallery with jQuery
PHP with MySQL Essential Training
Dreamweaver CS5 with PHP and MySQL

Share this:Share on Facebook37Tweet about this on Twitter23Share on Google+0Pin on Pinterest0Share on LinkedIn3

lynda.com - start learning today

Tags: ,

6 Responses to “Why you should learn PHP after HTML, CSS, and JavaScript”

  1. This post was very informative

  2. Jaime says:

    Very nice post, thanks.

    I’m not absolutely sure (this is a polite way to say I don’t agree ;-) that you should learn HTML, CSS and Javascript before PHP.
    Of course a basic HTML knowledge is needed, but not more than that.

    For someone that is starting learning to code (and that don’t knows anything about coding, html, css, javascript, php or web development), I think that beginning directly with PHP is much more motivating and fast.
    I started learning PHP by the end of last year, and that was my approach. I’m very happy to have done that and I’m now the prowd owner of feedbacking.me, my first web application.

    I write about my learning process in learningphp.me, in case you’re curious.

    thanks for the post,

  3. kesh says:

    Hi..it is vry informative thanks to al..just nw i completed B.E(ECE).i know its differ frm my dept but i hav idea to do php.. whether it wil be difficult for me to do php directly ???

    • Hi, Kesh- in my opinion, not at all! PHP’s a fantastic introductory language both to web development, and programming in general- and it’s an incredibly powerful language that can grow with you as you learn. It’s used as the basis for many of the common content management system on the web today, and is free/open source so there’s no cost for entry to get started. I’d strongly recommend giving it a try!

  4. D Isaac says:

    Great information – PHP is a ‘must’ learn for all web developers and even designers, since it brings so many options with it. If you are at the stage where you can design great sites, PHP will only allow you to create more intelligent sites, broadening your vision, inspiration and imagination.

  5. Golam Qauser says:

    Hi There,

    This is Very nice post. Now I know why I should learn PHP. thanks.

Leave a Reply