25 PHP Resouces

25 Resources to Get You Started with PHP from Scratch

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.

<?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!

Drew Douglass is CreatingDrew on Codecanyon
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://blog.brenelz.com Brenley Dueck

    Excellent Article!

    Takes you from the beginner stages, right to the advanced PHP frameworks.

    Have a great christmas all!

  • http://blog.rajatpandit.com rp

    symfony is seriously the best framework by far! its slightly bloating but then its the balance you need, worth exploring once you have the basics of php

  • http://indigo-webstudio.com guile

    great article, as always!

  • http://laminbarrow.com Lamin

    Great list..thnx for the post.

  • Mathew

    You made a typo.

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

    “ans”.

  • http://www.xqlusive.nl xQlusive

    This is an good article for the first steps into PHP development.

  • http://www.chadwarren.info Chad Warren

    Awesome collection of VERY useful information.

  • Bogdan Popa

    Not to be mean but, GD isn’t an “advanced oop technique”, it isn’t even oop and the oop presented in the other tutorials is outdated, you should point people to the (relatively) new (better) way of doing oop (php5′s been around for a while now, you know).

  • Bogdan Popa

    Oh, sorry. I read the header wrong. Please ignore my comment on gd (the oop ones still stand ‘tho).

  • http://creatingdrew.com Drew

    @Bogdan- I didnt say it was an OOP technique, if you read the header for step 3, it is supposed to read “Advanced and OOP techniques” emphasis on the “and”. Maybe I should have written “Advanced techniques and OOP techniques”?

    As for the tutorials, I liked them and have used them before while learning. By all means if you have some to share with us please dont leave us hanging :)

    Drew

  • http://creatingdrew.com Drew Douglass
    Author

    @Bogdan-
    No worries, I probably should have worded that differently. Its meant to read as “Advanced techniques and OOP techniques”.

    Regarding the tuts, sorry you didn’t find them useful, but I actually used these when first starting out which is why I went back to them. I would love to see the ones you enjoy though, please do share them :)

    -Drew

  • Mike

    So is this starting the Learn PHP From Scratch series over again or is this just a refesher? I have been hoping the series would pick up again….

  • http://www.instantshift.com DKumar M.

    Nice list Douglass, Useful for every PHP developer in general.

    Thanks for sharing.

  • http://creatingdrew.com Drew Douglass
    Author

    @Mike-I’m not sure, I’ll have to see what the boss man says.

    @DKumar-Thanks very much, I appreciate it. Also, Douglass sounds totally cool when you say it like that ;)

    Also forgot to say Happy Holidays to all! Hope its a good one :)

  • andylay

    Excellent article, great for anyone new or who needs a quick refresher (like me) before starting a new project.

  • http://www.devlim.com devlim.com

    Great resources, but still need time to master PHP language.

  • http://themeforest.net/user/JeffreyWay Jeffrey Way

    @Mike – No not exactly. That will resume in January on the ThemeForest blog. “PHP for Absolute Beginners: Video Series”.

    I’d let Drew write them…but I want it for myself! :)

  • Kenny

    Great tutorial! But I have a question:
    I’m a big ASP.net/c# developer. What would be the reason to choose PHP over that technology?

    I know VERY little about PHP, I guess thats why I’m asking.

  • http://devolio.com/blog Joey

    Great resources for learning PHP.

    I noticed the link for “Regular expressions introduction” points to the same link as the secure file upload link.

  • http://themeforest.net/user/JeffreyWay Jeffrey Way

    @Kenny – I’m into ASP.NET as well. For business applications, I still think that ASP is the way to go.

    On the other hand, PHP is much, much easier to learn. You’ll learn it in a fifth the amount of time it takes to learn ASP.NET.

    But I still love both! :)

  • mike

    Jeffrey, I am looking forward to it, I found the original series very helpful.

  • Kenny

    @Jeffrey Way – I mostly write business applications with database backends. What application examples can you give that would be written efficiently in PHP?

    Thanks!! I’m still bookmarking this post :)

  • Simon

    TYhanks very much, very informative!

    I am following the newbie tutorials and it is really great!

  • http://techzilo.com/blogging/ Sumesh

    Useful. I’ve been going over your “PHP for beginners: a training regimen” post, and wished for more. I guess you’d really get what you wish for on Christmas eve :)

  • Sam

    In terms of frameworks, you should really mention Kohana. It was originally based on CodeIgniter before getting a complete re-write, to the extent where it is now enhanced to work purely around PHP5 (no PHP4).

    It is incredible compared to both CI and Cake.

  • http://www.cssgalleries.com Rob

    Yet another great post. Thanks for the resources

  • Pingback: Ten Greatest NETTUTS Articles | CssGalleries

  • Pingback: The Best Way to Learn PHP - doDesign

  • Pingback: 702 | mind the gap » bookmark expo 2008-12-14 - 2008-12-24

  • http://www.toputop.com kiran

    This is great resource for starters in PHP.Thanks…

  • Pieter Vriesacker

    stop writing “your” when it needs to be “you’re”, get your language right man.

  • http://acomment.net Mohsen

    Great resources for beginners. I’ve written a similar post called:
    PHP Tutorials Utopia: 13 Vital PHP skills for every novice PHP developer and solutions
    you can check it here
    http://acomment.net/php-tutorials-utopia-13-vital-php-skills-for-every-novice-php-developer-and-solutions/378

  • http://www.arsln.com fatih

    thanks man php is the best!

  • Ralex

    I need this, so thanks!

  • http://searchcorner.blogspot.com/ Krishna

    Wow !! this is a cool compilation of PHP resources all @ one place

  • http://www.robertjoosen.nl Plaz

    Oh! Great for us beginners! I always wanted to learn this. Thanks!

  • aljuk

    Great post and threads, just what I’ve been looking for. Thanks.
    I found it via popurls.com btw

  • http://josemota.net José Mota

    This is absolutely brilliant!

    I really thought I didn’t know that much of PHP, like secure pages, GD and security.

    There’s one thing you could mention though: WEB SERVICES. That would really kick it to the top. If you have something about it, let me know! Thanks and grats!

  • http://blogspot.fluidnewmedia.com Ahad

    Certainly an informative article. For those out there interested in Code Igniter -> yup it is an easy way to get started with php. There are many helper classes and libraries that you can drop in with one line of code. + great documentation and a great community.

    Symfony and Cake are awesome but require you to use command-line syntax, which can be daunting (however i love the command line).

    My advice would be to use a framework and don’t go the flat file way,as many intelligent developers have given you the helper files and classes to aid you with common tasks (forms, jscript, email attachments, pdf generators, etc etc.)

    For you all out there thinking about Framework development consider Ruby on Rails as well. Rails is feature rich, and you can build apps quite quickly with the framework -> its just a matter of getting used to the syntax. It took me 30 minutes to develop a wiki with Rails including CMS, login and role management.

    If you ask me Ruby’s syntax is much easier to read and if you are going to learn a new language then it could be Ruby. WOOT WOOT!!!

    Here are some articles of interest:
    http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html
    http://andyjeffries.co.uk/articles/why-i-think-ruby-on-rails-is-an-ideal-web-development-environment

  • Robert D’Arcy

    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).

    you’re *not* your

  • http://www.tutoriais.emgrande.com cutt

    great :)
    Thanks for share this list !

  • Rob

    re: Secure file upload with PHP.

    That is anything but secure!
    For starters anything uploaded should be saved outside the web root.
    Thinking you’re safe by only accepting an image file is not a safety measure. Most image formats allow text comments where php code can be inserted.
    I just worked through the security issues regarding file uploads and it takes some work to make it truly safe.

  • Pingback: 25 Resources to Get You Started with PHP from Scratch - NETTUTS - Illuminations

  • http://stopdoingnothing.com Patrick Allmond

    If you are serious about getting started and getting good at PHP do not go to all of these product websites and try to download and configure everything. You will get frustrated and lose learning time. Go get Xampp. It installs Apache, PHP, Mysql, Perl, and FTP server and configures it all to work together out of the box.

  • Ryan

    What is the best free php editor??

  • Pingback: JeremiahTolbert.com » Blog Archive » links for 2008-12-24

  • http://matt-radel.com Matt Radel

    Awesome! Please keep ‘em comin’…I’d love to see one on writing a dynamic navigation (with and without a db).

    You guys rock – I look forward to catching some screencasts!

  • Demian

    Thanks! i really need something like this for my auto learning in the php world.
    Guys, you rocks!

  • Pingback: The Michael Gass Journal » Blog Archive » From nettuts.com: 25 Resources to get you started with PHP from scratch

  • http://blog.NOVALISTIC.com BoltClock

    CodeIgniter ftw!

    Thanks for posting this resource, I’ll definitely share it with my friends who want to get started :)