Advertisement
  1. Code
  2. Roundups

25 Resources to Get You Started with PHP from Scratch

Scroll to top
Read Time: 7 min

Not too long ago, Jeffrey wrote an excellent article on resources to get you started with jQuery. Now its time to give some love back to the server side, and become more familiar with PHP.

PHP is a scripting language that is perfect for developing dynamic web pages and applications. You may be a PHP ninja, or perhaps you don't even know what PHP stands for. However, if you plan on or are involved in any kind of web development, you are bound to run into this fantastic and easy to learn web language. Today we will review 25 resources to get you started with PHP.

So what the heck is PHP?

Straight from the manual, PHP is "a general-purpose scripting language that is especially suited for web development and can be embedded into HTML." PHP is a server side scripting language, meaning all data is interpreted and sent to the browser before the web page is loaded. This is the exact opposite of Javascript, which we call a client side language. All you need to keep in mind is that PHP is a web language that operates and runs on the server side. Next we will study the advantages of PHP and basic syntax before diving into to various resources.

What are some advantages of using PHP?

Every web language comes with its advantages and disadvantages, and you will find PHP is no different. However, PHP is a popular web language for many reasons.

Easy learning curve. The less time you have to spend searching the manual and studying a web language, the more time you will have to actually create and optimize your application. One of PHP's best features is that it is extremely easy to learn compared to other web languages. The syntax is arguably logical and many of the common functions describe exactly what they do.

Familiar syntax. PHP is a great language for developers with programming experience, especially programming in C and Perl, which is what PHP's syntax is mostly based on. If you know how to program in C and/or Perl, you wont have any issues writing applications in PHP.

Cost. It's free and open source. Can't beat that.

Performance.PHP is a relatively efficient web language. Scalability in your code and applications is very important and you can rely on PHP to serve as many web pages as you need efficiently (of course, it can't help if your coding inefficiently).

Community. The PHP community absolutely rocks. You'll find some of the most in-depth and comprehensive documentation of the entire language at php.net. In addition, there are thousands of PHP help forums and websites to help you when you get stuck. Furthermore, since PHP is open source, it is constantly being improved. PHP 5 recently implemented very strong support for object oriented programming and the language continues to become more powerful.

Overview of the syntax

In case you have been living under a rock and have never seen a PHP script, here is a very basic example of how PHP is written.

1
2
<?php echo "Your first php script!"; ?>

A few things to note. Notice the opening tags start with <?php and end with ?>. You may see some developers leave off the 'php' after the question mark. This is called using PHP short tags and is considered bad practice, always use full php tags. You will also notice that the line ends with a semi colon, if it does not PHP will throw an error. Now lets move on to some resources to get you started.

Step 1. Download PHP and learn the fundamentals.

First things first, we need to download the latest version of PHP and install it so we can work with it locally.
Visit PHP.net to get the latest version and any libraries you wish.

Recommended Reading

  • Installing PHP

    Installing PHP on any OS.

    Straight from the manual, follow the link below to get started installing PHP on any operating system you happen to be running on.

    Visit Article

  • PHP 101

    PHP 101-For the absolute beginner.

    I still find myself coming back to this article on the zend dev zone. If your new to PHP, this is a must read tutorial/guide.

    Visit Article

  • Your first script

    PHP.net-your first script.

    Time to get down and dirty with your first php script from the PHP.net manual.

    Visit Article

  • Tizag Walkthrough

    Tizag-a complete walkthrough.

    Odds are you have visited Tizag.com sometime in your web development career, and you can find a giant section of php tutorials at the link below.

    Visit Article

  • Web monkey Tutorial

    Webmonkey-PHP tutorial for beginners.

    Webmonkey has an extremely in depth article for those new to PHP, covering everything from variables to functions to loops and operators.

    Visit Article

Step 2. Intermediate techniques and MySQL databases.

Now that you have learned the basics and fundamentals of PHP, lets move onto some intermediate techniques and using PHP with MySQL to create dynamic websites. PHP works extremely well with MySQL, which is a database language. Using the two together, we can create nearly any kind of website we wish.

Recommended Reading

  • Installing MySQL

    Installing MySQL and getting started.

    This article from the php manual will get you started and show you how to install MySQL and use PHP to interact with the database.

    Visit Article

  • PHP-Mysql_Tutorial

    PHP-MySQL tutorial.

    Everything you need to know about using PHP to interact with your newly setup MySQL database. How appropriate that the site is named "php-mysql-tutorial.com".

    Visit Article

  • MySQL Tizag

    Tizag-MySQL introduction with PHP.

    Tizag takes you through each common MySQL and PHP command needed to get started building database driven websites.

    Visit Article

  • Membership with PHP

    User Membership with PHP.

    Now that we know how to use PHP and MySQL together, we can create a basic user login script.

    Visit Article

  • PHP secure File Upload

    Secure file upload with PHP.

    Uploading files is certainly a great way to add interactivity to your site, but this must be done with caution. Below is a great article on uploading files securely with PHP.

    Visit Article

  • Regex Intro.

    Regular expressions introduction.

    Using regular expressions is a great way to validate and verify user input to meet your exact needs. Learning the syntax can be a little tricky, so we'll cover a few regular expressions tutorials.

    Visit Article

  • Regular Expressions

    A crash course in regular expressions.

    Jeffrey delivers with another awesome screencast on using regular expressions.

    Visit Article

  • Regular Expressions cheat sheet

    Regular expressions cheat sheet.

    Cheat sheets are incredibly useful to any programmer or developer and below you will find an excellent regex cheat sheet that you may download for free.

    Visit Article

  • Security Tips

    Dev zone security tips.

    Security is an important part of your application design so be sure to visit Dev zones' section on security tips.

    Visit Article

  • 10 php security tips

    10 PHP security checks.

    From O'Reillys dev center comes a list of 10 PHP security checks to make sure you are taking.

    Visit Article

Step 3. Advanced and OOP techniques.

Moving right along to what I would consider more advanced PHP techniques, including object oriented programming. OOP has drastically improved since the release of PHP 5.

  • PHP GD Library

    Using the GD library.

    The PHP GD library is an image processing library you can install with PHP. The GD library allows you to manipulate images in thousands of different ways.

    Visit Article

  • PHP Security Advanced

    Writing secure php files.

    A more advanced and in depth look at creating secure php applications.

    Visit Article

  • Intro to OOP

    Introduction to object oriented programming with PHP.

    Object oriented programming is a confusing concept to many new programmers, the below tutorial will take you step by step through the basics of OOP.

    Visit Article

  • Crash Course into OOP

    A crash course into object oriented programming.

    A slightly more in depth look and study of OOP with PHP.

    Visit Article

  • Real world OOP with php and mysql

    Real world OOP with PHP and MySQL.

    Nettuts brings us an excellent real world example of OOP being used to connect and manipulate a MySQL database.

    Visit Article

Step 4. Using PHP frameworks.

There are hundreds of PHP frameworks in existence now days, most are based on the MVC approach. Below we have listed some of the better PHP frameworks.

  • CodeIgniter

    CodeIgniter.

    One of the most highly praised PHP frameworks, Code Igniter claims a small and powerful footprint to help you quickly develop applications.

    Visit Article

  • Symfony

    Symfony Project.

    The Symfony Project is a full stack PHP framework built with PHP 5 library classes.

    Visit Article

  • Akelos

    Akelos.

    Another framework based on MVC, Akelos claims to be a simple ans easy to us PHP framework.

    Visit Article

  • Zend

    Zend framework.

    The ever popular Zend framework is an extremely powerful framework with a slightly higher learning curve.

    Visit Article

  • CakePHP

    CakePHP.

    CakePHP might just be the most popular PHP framework around right now. One of the highlights of CakePHP is the fun and easy to understand documentation, which teach you how to "bake your cake".

    Visit Article

That'll do it for today's round up. Please let us know if you have any resources or articles we missed in the comments section!

Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.