Trang chủ‎ > ‎IT‎ > ‎WEB PROGRAMMING‎ > ‎

04 - PHP

Learn PHP - [2019] Most Recommended PHP Tutorials |

PHP 5 Tutorial - W3Schools

Learn PHP with the Top 25 PHP Tutorials: Resources, Websites ...

Official PHP Manual
PHP: The Right Way
Hacking with PHP

You can check comprehensive list of PHP learning resources here

PHP Tutorial - Introduction
PHP Manual - Manual

PHP: The Right Way

The Top 10 Websites to Learn PHP

1. PHP Manual

This is the official manual for the PHP language. It is a comprehensive guide on PHP and covers everything from basic commands and their usage to overall security and functions. If you need to know something — nay anything — about PHP you’ll find it here. It’s not exactly the most user-friendly or attractive guide out there, but it is arguably one of the best. Plus the simple structure and layout makes it remarkably accessible via mobile devices — so you can read a lot of the content while you’re on-the-go.

Price: Free

2. PHP Tutorial by Tizag

This resource is ideal as PHP reference material and largely focuses on the definition of PHP, commands and methods for using them. In that respect, it’s not what you’ll want to turn to when it comes to actually applying those commands or using them in the real-world. Instead, it serves as a direct reference — similar to a textbook. Keep it bookmarked though, because you will eventually need it especially when you dive into practical coding.

Price: Free

3. PHP 101

As the name implies, PHP 101 is designed with “the absolute beginner” in mind. If you’re just starting out with PHP and you prefer to learn by example, this is a great place to go. The site offers a series of entertaining and useful tutorials written by none other than Vikram Vaswani — founder and CEO of Melonfire. The content is clear, concise and extremely easy to understand especially for coding newbies. Once you complete the entire tutorial, you’ll move on to creating a simple RSS news aggregator via PHP. The only downside to this site is that there aren’t many screenshots to reference, so you’ll have to learn the appearance of PHP code all by your lonesome — which isn’t necessarily a deal breaker.

Price: Free

4. Hacking With PHP (Formerly Practical PHP Programming)

This guide is separated into chapters, with each breaking down a different topic or element pertaining to PHP. An overview of the language leads the way, providing you with a brief introduction to the field and then it closes out nicely with some practice exercises and additional links to resources. As the name explicitly states, this is a great reference for those who prefer lessons that adopt a more practical approach.

Price: Free

5. Killer PHP

This is one of those eccentric wildcards that actually turns out to be remarkably useful. Why is it eccentric or strange? Well, unlike most of the other tutorials here you jump right in and start playing around with PHP. It’s a “hands-on” tutorial that doesn’t mess about. You get in, learn “usable PHP skills as quickly as possible” and then get out. That’s it. As an aside, there are complimentary videos that cover each section of the tutorial although they’re not what you could call a high caliber. That is, don’t go into Killer PHP specifically for the videos, they’re not anything special.

Price: Free

6. The Learn PHP Tutorial

The Learn PHP Tutorial is essentially a list of downloadable videos that walk you through the basics of PHP. It’s great for beginners and offers a more visual guide. You’ll not only learn PHP, but you’ll also learn what you can do with it through examples and best practices.

Price: Free

7. PHP Tutorial by W3schools

This guide is similar to the tutorial by Tizag above. In fact, the style and presentation are almost identical. Tizag’s tutorial covers a lot more ground — although that doesn’t mean W3schools’ content isn’t worth checking out. Once again, it should be used as a reference as opposed to a step-by-step tutorial or guide.

Price: Free, but if you want a certification from W3schools, that costs $95.

8. PHP with MySQL Essential Training by Kevin Skoglund

This is actually a course, that offers about 11 hours of training. If you don’t have an active subscription to Lynda you can sign-up for a 7-day free trial which is plenty of time to complete the course. Why did it make the list? The teacher does a great job of explaining PHP programming in layman’s terms making this course ideal for newbies.

Price: After a 7-day free trial, access to this course ranges from $19.99/month to $29.99, depending upon the kind of access you want to the course (such as offline access).

9. Getting Started with PHP by Randy Hoyt

Treehouse is one of our favorite online coding schools, which explains why this lesson made the list. It actually walks you through the process of using PHP to build an ecommerce store. You’re not just learning the necessary elements, commands, and steps — you’re putting them to good use.

Price: After a 14-day free trial, Treehouse starts at $25/month

10. PHPBuddy

PHPBuddy contains a smattering of online tutorials, lessons and articles on programming with PHP. It’s quite text-heavy and there are limited videos, screenshots and media available. Don’t let that scare you away though, it’s still a worthy reference.

Price: Free

Other Helpful Online PHP Resources

11. PHP and MySQL

Back in the day, was a great place to go for reference material for anything. It’s still a great place to go for select topics, like PHP. There are quite a few specific tutorials that teach you how to use PHP to do things like functions, loops, generate forms, call upon simple math functions, use time and calendars, redirect URLs and pages, and enable countdowns.

Price: Free

12. 1Keydata

If you’re looking for basic tutorials that cover nearly every topic about PHP, then 1Keydata is the place to go. It offers a series of text-based tutorials and guides on MySQL and PHP. You’ll learn basic commands, string functions, syntax and more.

Price: Free

13. GoodPHPTutorials

This site is a simple RSS news aggregator for PHP tutorials and references. It’s great if you’re looking for something in particular or if you just want to see timely content.

Price: Free

14. SitePoint PHP

SitePoint takes a more modern approach with their guides and tutorials, which are offered in an article-like format. It’s great for any skill level, but intermediate and expert coders will find is useful for staying up-to-date with current PHP trends.

Price: Free

15. PHP The Right Way

This site is dedicated to PHP coding “the right way” as advertised. Outdated information can often cause issues and propagate bad practices while coding particularly with new coders. You’ll find extensive tutorials on various PHP topics and plenty of references to other “good practice” tutorials and sites.

Price: Free

16. PEAR

Pear is actually a “framework and distribution system” for existing PHP code and components. In other words, depending on what you need you might be able to find pre-existing components to use or even learn with.

Price: Free

17. PHP Cheatsheets

This is a reference for intermediate to advanced coders that might need help with variable comparisons, arithmetics, and variable testing throughout various versions of PHP. If you have no idea what any of that means, you’d be better off starting with a beginners guide or basic coding tutorials.

Price: Free

18. PHP Academy (YouTube)

If you’re more of a visual learner and prefer to see the code and how PHP works, then the PHP Academy YouTube channel is right up your alley. There are hundreds of tutorials, spanning years of lessons. New content is added weekly — if not daily — and it covers a wide range of PHP-related topics. It’s great if you’re looking for something specific, like how to utilize PHP to create a user registrations and login system, or setup PHP authentication.

Price: Free

19. PHP Training on Tuts Plus

Like or Treehouse, Tuts Plus is a site dedicated to online coding lessons. The PHP Training section covers a wide variety of topics, with course levels ranging all the way from beginner to expert. Lessons for Tuts Plus also tend to be more specific, with topics like WordPress plugin development, creating a PHP Woocommerce theme, and setting up an automated testing network through PHP.

Price: Ranges from $15/month for monthly access to $360 annually for pro access. Student discounts are available.

20. Learn-PHP Interactive Tutorial

The Learn-PHP interactive tutorial will walk you through PHP development. The site is still under construction, which means some of the later tutorials are still being revamped and new stuff has yet to be added. It’s still a great site for beginner to intermediate PHP coders.

Price: Free

21. PHP Freaks

This site is great for any skill level, and includes over 400 snippets of usable code that you can either use with existing projects or study to learn PHP. It’s not exactly the most user-friendly site, nor is the design attractive, but that doesn’t matter when it comes to learning the techniques presented. Give it a try, you might be surprised at what you find on the PHP Freaks site.

Price: Free

22. PHPVideoTutorials

This site offers a handful of PHP-related video tutorials that range from about 6 minutes to 22 minutes long — depending on the lesson. When used in combination with any number of the other sites found here, it could be considered invaluable to learning PHP. However, on its own, it’s rather weak.

Price: Free

23. After Hours Programming PHP Tutorial

After Hours offers a basic, and extremely simple look at coding with PHP through text-based tutorials. Beginners only.

Price: Free

24. Develop PHP

The Develop PHP website offers a great deal of video tutorials related to PHP from beginner to intermediate levels. The videos are actually hosted via YouTube and embed on the site, but the website provides a much easier way — and more organized way — to pull up the different courses.

Price: Free

25. PHP Tutorial

This comprehensive PHP tutorial for beginners will introduce you to many common practices used during PHP development. The PHP tutorial is actually the third of four different tutorials including HTML, CSS, PHP and JavaScript. You don’t necessarily have to follow the natural order — which calls for learning HTML and CSS before PHP — though it may be beneficial to do so.

Price: Free

26. Home and Learn Beginners PHP

Once again, the Home and Learn PHP tutorial is designed specifically for beginner coders and starts by introducing you to the basics. The lessons include an introduction to PHP, working with variables, conditional logic, HTML forms, programming loops and finally arrays.

Price: Free

27. Bento PHP Resources

Similar to Treehouse, Lynda or Code School, Bento is an online coders library. Their specialized PHP resources will take you through easy, medium and hard tutorials ranging from beginner to expert coding levels.

Price: Free

28. The PHP Basics

As the name of the site implies, the PHP Basics tutorial will walk you through all the beginner to intermediate elements of PHP coding. There’s also an extremely useful Q&A forum of sorts that you can use when you run into problems of your own during exercises.

Price: Free

29. TheNewBoston PHP video tutorials

This website has a ton of PHP-related video tutorials. Once you’re done with the basic and introductory lessons, you can move on to more advanced stuff like PHP with MySQL, creating a CMS, and much more. Even if you’re an expert, there might be something for you here.

Price: Free

30. PHP Tutorial for Beginners by WebMonkey

Once again, this is a basic tutorials website for those new to the world of PHP coding. Most of the tutorials are text-based, and there isn’t much media. However, there are plenty of code snippets that you can use during personal exercises.

Price: Free

31. PHP 5 Power Programming

PHP 5 Power Programming is actually an eBook – or eTextbook — for PHP beginners that you can download completely free. It’s not a beginner’s book at all and certainly requires prior coding knowledge. It would be best suited for intermediate to advanced programmers. To download the book, select the “Downloads” tab and you should see two options, one to download as a zip file and the other to download as a PDF. You do not have to pay for the eBook version, it’s only the print version that costs money.

Price: free for eBook version

32. Wikibooks PHP Programming Guide

Similar to Wikipedia, Wikibooks has an open, crowdsourced approach to knowledge distribution. The PHP programming guides are remarkably comprehensive and cover a wide variety of topics from beginner to intermediate levels. If you’re a more advanced coder, or you want to learn how to do something specific — like create a CMS with PHP — you might want to look elsewhere.

Price: Free

33. Tutorialzine PHP Guides

If you already know the basics and you understand PHP, yet want to know how to do something specific then Tutorialzine is the place to go. You can learn how to make things with PHP and jQuery like a shoutbox, file browser, registration system, CMS and much more.

Price: Free

34. Video PHP Blog

The resource we have linked — called Diving into PHP — was actually created by Jeffrey Way from Theme Forest. All of the episodes have been embed on the Video PHP Blog website. Why does this matter, you ask? Well, because if you’re a beginner to intermediate coder you can follow the Diving into PHP lessons. If you’re a more advanced coder, you can visit the other areas of the Video PHP Blog website where you’ll find plenty of additional resources.

Price: Free

35. CSS-Tricks

This site is actually primarily dedicated to CSS, HTML and WordPress oriented coding. It does have a useful PHP section, which is what we’re including here. You will need prior experience to work with a lot of the concepts discussed, so intermediate to advanced PHP coding skills are ideal.

Price: Freemium, code tutorials free to access, but more comprehensive videos available to subscribers (starting $12.00/month)

36. Microsoft Azure PHP Tutorials and Documentation

Microsoft Azure is the tech giant’s answer to cloud computing. Most of the PHP tutorials and documentation you will find on the site are related to Azure, but there are some gems hidden in there. If you work with Azure, this is the place to go. It’s not an ideal resource for newbies so keep that in mind.

Price: Free

37. Webucator Free PHP Tutorial

If you have the cash, Webucator offers a 4-day $1,500+ introductory course on PHP. However, you don’t need to enroll to take advantage of their free PHP tutorial. Most of the elements discussed are pretty basic, so intermediate to advanced coders won’t find much interesting. On the other hand, beginners should find a lot of great material.

Price: Freemium – if you want more comprehensive learning, prices range from $199.80 to $1,580

38. MPSoftware

Much like we’re doing here, MPSoftware has compiled a list of useful PHP tutorials, guides and lessons. You won’t find much that we haven’t covered already, but it’s still worth checking out.

Price: Free

39. Freewebmasterhelp PHP and MySQL Tutorial

This site offers a comprehensive introduction to PHP and MySQL and takes you through the first stages of working with the language. It’s great for beginners, but there are no images or videos — it’s strictly text-based. If that’s not an issue for you then check it out.

Price: Free

40. PHP Everyday

Instead of offering a comprehensive tutorial and guide database, this site operates more like a traditional blog. However, nearly everything is related to working with PHP. There are more traditional tutorials if you need them.

Price: Free

41. The Site Wizard Writing PHP Guides

Through the Site Wizard, you can learn a great deal of basic to intermediate PHP coding concepts. The lessons are bland, yet easy to follow.

Price: Free

42. PHP Jabbers

The site is kind of a hidden gem for intermediate to advanced PHP coders. There are a lot of specialized guides on offer here, ranging from creating a PHP calendar to setting up a custom captcha system.

Price: Free

43. HScripts

If you prefer to learn by studying real-world examples, then look no further. HScripts offers a huge list of PHP coding examples that you can pour through one-by-one. Due to the nature of the site, it’s best left to coders with prior experience. Beginners would have a tough time sorting through the various functions, commands and elements.

Price: Free

44. TutorialsPoint PHP

Like many of the sites on this list, TutorialsPoint has an entire section dedicated to PHP programming with lessons that range from beginner to intermediate course levels. There’s even a free eBook on offer that you can download as a PDF file.

Price: Free

45. Webassist

Unlike many of the other resources listed here, Webassist is a premium portal. You can search for PHP-related guides through the internal search feature. You’ll be able to browse all the available tutorials and see the first section of each guide for free. After that you’ll need to login for complete access.

Price: Freemium

46. PHP for Kids

This resource is pretty self-explanatory. It’s a series of PHP tutorials and guides for children. Don’t be fooled, it’s a great resource for coding newbies of any age.

Price: Free

47. FreeBookCentre PHP Books

FreeBookCentre offers a huge library of free eBooks. Naturally, the PHP section has a decent selection of guides, textbooks and more. Most of them are offered in the PDF file format.

Price: Free

48. Sourcecodester

This is another great programming and development blog that covers a variety of topics. Of course, the most relevant are the PHP-based guides. The content is ideal for intermediate to advanced PHP coders. Beginners need not apply.

Price:  Free

49. SiteGround PHP and MySQL Tutorial

This free online guide starts with simple topics like “what is PHP” and then moves on to working with MySQL.

Price: Free

50. LateralCode

Unfortunately, this blog hasn’t been updated in a while — since 2011 — but it’s still a decent resource. Most of the PHP tutorials and guides you’ll find on the site are for more advanced projects.

Price: Free

That’s a Massive List of PHP Websites and Resources!

You should be able to find at least one website or resource on this list that will help you get familiar with PHP.

If you’d rather learn in a more classroom-style format, give one of the many online code schools a try such as Treehouse, Lynda or Code School.

If you’ve decided to learn PHP online, you will find countless websites offering the best PHP courses. Choosing the right resource can be a challenge. That’s why we have narrowed down the choices and compiled a list of some best paid/free tutorials to learn PHP as a beginner,  easily and quickly. We all know that PHP is a powerful open-source, server-side programming language. 80% of the top 10 million websites, including Facebook, Yahoo, and Flickr, use the PHP programming language.

PHP is definitely a common programming language that many beginners start out learning. That’s because its a great choice if you choose to go into freelancing as a independent web developer (see their typical salaries here). Just about all modern sites have php as the core CMS of their internal code within the server side.

So, if you’ve decided to learn PHP, you’re moving towards a bright career, as PHP professionals are high in demand. If you want to learn PHP, whether you are a novice, intermediate or pro, you can benefit from many PHP tutorial sites available online. Here is the list of the best PHP tutorial sites that will help you get started with the language or broaden your current skills.

To ease the pain of finding the best resources to learn php, we compiled a list for you below!

Contents [show]

PHP Manual

The PHP manual is an official, comprehensive guide to the PHP programming language. It covers everything from basics to advanced security implementation in PHP. Its simple and easy to understand structure makes it conveniently accessible on a smartphone as well, making it handy on the go. Each tutorial deeply explains a concept of PHP using understandable syntaxes and examples.

But, since it presents all PHP tutorials in the purely textual form, you should have a basic understanding of PHP fundamentals. If you’re a newbie, some tutorials in the PHP Manual might be complicated to understand. Newbies can combine PHP Manual with video tutorials for better understanding.

The best part is that every page on the PHP Manual features an ‘add to note’ section. This section allows users to contribute their comments, examples or feedback on each lesson. PHP Manual incorporates the best examples and feedback within the main text of the manual to improve it.

You’ll learn:

• Basics of PHP

• Installation and configuration

• Language reference

• Security

• Features of PHP

• Function reference

• Hacker’s guide

• Appendices

Price: Free

PHP 101

If you are a complete beginner to PHP, this is a great place to start with. The site consists of a series of informative tutorials with a pinch of entertainment. All the tutorials are written by Vikram Vaswani, founder and CEO of Melonfire, a leading open source software consultancy in India.

The content on PHP 101 is clear and so easy to understand that even a novice can learn the PHP basics quickly. Tutorials are categorized into several parts from the basics to the core concepts of PHP. PHP 101 tutorials build on an already-published 5-part series, which has now been updated to embrace PHP 5. Thus, these tutorials are suitable for those who have worked with PHP 4 in the past. The only qualm is that PHP 101 tutorials lack enough screenshots so that learners can see how the code appears on the browser.

One important thing to note is that PHP 101 is great for beginners only. Once you’re past the beginner level, you need to move other websites with detailed tutorials on PHP.

You’ll learn:

• PHP’s variables and operators

• Control structures and arrays

• Accessing external files using PHP scripts

• OOP in PHP4 and PHP5

• MySQL database

• Sessions and cookies

• SQLite

• Web application implementation and so on

Price: Free
Official Website

Team Treehouse

Team Treehouse is a leading online coding school that offers a nice selection of high-quality PHP courses. All the courses are crafted in purely video lectures delivered by the industry experts.

Treehouse groups their courses into learning tracks to provide you with more guidance. The PHP track includes many courses on PHP development for beginners, intermediate and advanced learners. You will find PHP courses nicely paired with HTML and CSS courses. Treehouse offers a couple of PHP courses on tools, like Git and console foundations.

Recommended courses:

• Environment variables with PHP: In this 44-minute PHP course, you’ll learn about different environments involved in the typical workflow of a PHP-based application. You’ll also learn to use environment-specific variables to make the application adaptable while securing credentials.

• File handling with PHP: Explore different ways to read and write files from a directory with PHP. Also, learn different ways to use built-in parsing functions for working with standard file formats to read and write XML, CSV and JSON data.

• Browser persistent data with PHP: Take this course to learn the ways to persist data in a browser and how to make apps that are ‘user aware’. You will also learn how to check browser sessions, and write/read/delete cookies in this course.

Price: After a 7-day free trial, Treehouse starts at $25/month that gives you access to all courses and content.
Official Website


PluralSight is another massive library of online learning courses for PHP and other technologies. The website offers assessments, learning paths and courses authored by industry experts.

Whether you are a beginner or an individual looking to close the skills gap in specific PHP areas, PluralSight gets you covered. You will learn through video tutorials, written tutorials and by working on projects in each course.

Recommended courses:

• PHP Get Started: This course gets beginners started with PHP in no time. It covers PHP installation and configuration, forms management, working with databases, lists, state management and much more.

• Object-Oriented PHP: Essentials and Constructs: Take a tour of object-oriented constructs in the PHP language. This course details the construction of objects, classes, properties and methods in PHP and teaches different ways how to use them for defining software models.

• RESTful Web Services with PHP and Laravel: Learn to use RESTful services and Laravel tools. This course teaches how to structure and implement a secure RESTful service and implement it using PHP and Laravel.

Price: Sign up for the 10 Days Free Trial and get an annual subscription and Save 15%.


Udemy is a world-popular platform offering high-quality courses on just about every topic, including PHP development. Choose from a library of over 4500 courses taught by the industry experts. Choose a PHP course on the basis of 5-star rating and feedback from previous students. Each PHP course features 300+ video lectures designed by the PHP experts. Apart from video lectures, each course is accompanied by some downloadable resources, articles and certificate of completion. Most of the courses are accessible on both mobile and TV.

A 30-day money-back guarantee gives you a piece of mind when paying for a course.

Although the courses are not entirely free, Udemy offers heavy discounts on PHP courses, especially for new users. For example, on PHP for Beginners – Become a PHP Master – CMS Project course, Udemy offers 94% discount.

Recommended courses:

• The Complete PHP MySQL Professional: This course takes you from the basics to advanced PHP MYSQL concepts step by step. After every section, you will work on a project to see the real-world application of the concepts you’ve learned so far. You will learn to use PHP Sessions in a more sophisticated way, sending email using PHP and so on. Full coding exercises will help you brush up your newly acquired skills.

• PHP with Laravel for beginners: Learn to use Laravel for developing advanced applications such as a real CMS. You need the understanding of basic OOP PHP for pursuing this course. In this course, you will learn about sessions, Github, creating a BULK functionality and so on.

• PHP for Beginners: How to Build an E-Commerce Store: This course teaches you everything about developing an E-commerce store using PHP. You will also learn to upload your application online once it is ready. You must possess the knowledge of HTML, arrays, variables, loops, MySQL, POST and Get Request to enroll in this course.

Price: Some PHP courses are free, while some courses are available for a set price and with discounts of up to 95%.
Official Website


Coursera is an extensive online library of courses on various technologies, including PHP. All the courses are designed and delivered by real university professors. Courses are available in English, Spanish, and French and can be subtitled in English, Spanish and Chinese. Every course is made up of interactive video lectures, assignments reviewed by peers and discussion forums.

All the courses on Coursera are free of charge, but you can pay if you want a “Coursera Verified Certificate) to prove course completion. Paying for a certificate grants access to the content not available in the free versions.

Recommended courses:

• PHP – Basics: Introduction to PHP: Gain an introductory understanding of HTML, and basic syntax and data structures of the PHP. This course, specially designed for beginners, covers PHP variables, arrays, error handling, iteration, and so on. You will gain skills to install and use an integrated PHP/MySQL environment like MAMP or XAMPP.

• Building Database Applications in PHP: If you want to learn how to build a database-backed web application using PHP, this course is for you. You will learn various object-oriented patterns available in PHP. This course also teaches how to connect to a MySQL using the PDO library and issue SQL commands in the PHP language.

Price: Introductory courses are free, while advanced PHP come with a set price of about $29 to $99.
Official Website

Killer PHP

Learning PHP has two phases – procedural and object-oriented programming. As a beginner, you start with the procedural phase that entirely involves scripting. Next, you level up and learn OOP PHP. And, Killer PHP is a treasure of hands-on video tutorials on OOP PHP and MySQL. All the tutorials and blogs are created by Stefan Mischook who has been teaching PHP for more than ten years.

Aside from video tutorials, you’ll take hundreds of quizzes to validate your progress and skill level. You will find lots of interesting PHP articles on their dedicated blog.

You’ll learn:

• PHP Fundamentals


• All about OOP PHP

Price: Free
Official Website

PHP Tutorial by Tizag

PHP Tutorial by Tizag focuses on PHP beginners and teaches the programming language from the ground up. But, this is not a great resource for those who are looking for a drive-through PHP tutorial. Each lesson consists of textual information on a particular PHP concept, accompanied by easy scripting examples.

This PHP learning resource mainly focuses on the definition of PHP as well as commands and methods of using them. You get customizable and downloadable PHP scripts for your practice. It best serves as a PHP reference material and can be used in combination with the PHP Manual. A quick access button allows easy content sharing and bookmarking.

You’ll learn:

• Introduction to PHP

• Files

• Strings

• PHP advanced

Price: Free
Official Website

PHP Guide

Hacking With PHP

Formerly known as Practical PHP Programming, this guide is organized like a book. The entire guide is broken down into different chapters and subtopics pertaining to PHP. Each lesson ends with an exercise that you can take to evaluate your progress.

Hacking with PHP serves as an ideal platform for PHP learners who prefer a practical approach. You can access this mobile-friendly site on any device irrespective of the screen size of your device.

You’ll learn:

• PHP Basics

• Databases

• Cookies and sessions

• Practical PHP and so on

• Writing PHP and extensions

• Multimedia

Price: Free


PHP Buddy

As the name suggests, PHP Buddy offers a friendly learning environment. It contains lots of online quick start PHP tutorials, scripts, high-quality PHP articles and lessons on the PHP programming language.

PHP Buddy doesn’t appear too attractive and interactive. But, if you prefer textbook-style tutorials, PHP Buddy is a great place to go for beginners. Though the tutorials are purely textual and have limited code snippets and videos, PHP Buddy is still a worthy resource when combined with other PHP learning websites.

You’ll learn:

• PHP quick start

• Installation

• PHP Articles

• Scripts

Price: Free
Official Website

PHP Companion

PHP 5 Power Programming

PHP 5 Power Programming is originally an ebook full of easy-to-understand PHP tutorials. The book is written by programmers and entrepreneurs, Andi Gutmans, Derick Rethans, Stig Saether Bakken.

PHP 5 Power Programming is a powerful learning resource for PHP intermediate and advanced programmers. Using this book as your learning resources requires prior knowledge of the PHP coding language.

You’ll learn:

• PHP 5 basics

• PHP 5 OO language

• Advanced OOP and Design Patterns

• Web Application with PHP

• Databases with PHP 5

• Error handling


• Mainstream extensions

• Using PEAR and so on.

Download it here.

Price: Free ebook; the print version is paid.
Official Website

Final Words

Hopefully, these resources will help you transform your career as a PHP programmer. We recommend combining several resources for great results. Choose what suits your preferences as well as your budget, if you opt for paid ones. However, most of the resources listed here are free and packed with expert PHP learning material. Last but not the least; keep an eye on the PHP trends to stay ahead of this ever-evolving technology.

If you benefit from these resources, let us know in the comments.

PHP Tutorials for Beginners

By Ada Ivanova on March 14th, 2018Web Design

You have probably heard that PHP is much easier to learn than any other programming languages, such as Java or the .NET languages, not to mention Perl, but if you are new to PHP, it can be daunting. If you are new to PHP, we are here to help.

The first block of PHP tutorials are more general and cover the basics of PHP as a language, such as variables, conditionals, HTML forms, loops, arrays, strings, functions… While the second block of tutorials are all about performing a particular task, such as creating captchas, building forms, and even building a complete CMS.

Now remember, take your time with each tutorial and enjoy!


A Simple Tutorial from

It doesn’t matter what kind of information you are looking for, it is always best to start at the source. This, of course, applies to learning PHP as well, the very site of the PHP programming language:

I am not saying this tutorial is the easiest, but it is a great tutorial for getting started with. It is more like a general introduction to PHP than a complete guide. It is split into the following sections:

  • What do I need?
  • Your first PHP-enabled page
  • Something Useful
  • Dealing with Forms
  • Using old code with new versions of PHP
  • What’s next?

The tutorial should only take you about 15 minutes to complete – providing you don’t check all the hyperlinks to the other pages. If you do, it will probably take weeks to complete.

A Simple Tutorial from →

Beginners PHP (Complete Course)

This tutorial is a much longer and more in-depth that the tutorial above. It covers all the basics of PHP, such as variables, conditionals, HTML forms, loops, arrays, strings, functions, security, file manipulation, MySQL, user authentication. At the end of the tutorial you will find chapters on how to code sample apps, such as polls and online forums.

This is a long tutorial and you may have to go through some chapters more than once, especially if you are new to PHP. So, you will need at least a day or two to go through it all.

Beginners PHP →

Introduction to PHP (Complete Course)

If you are a fan of video tutorials, then you will love this PHP Course. There are over 200 videos available and they cover absolutely everything about PHP. The series covers all aspects of PHP, such as how to install XAMMP, how to create your first PHP file, input/output, variables, conditionals, operators, loops, commonly-used functions, strings, arrays, sample applications, etc.

It’s a huge resource and if you want to learn absolutely everything, you will need weeks to cover it all. Each video is reasonably short, though – from 1 to 10 minutes, so you can watch a couple of them in a day, revise them on the next day, and thenmove onto the next video.

Introduction to PHP →

PHP 101: PHP For the Absolute Beginner (Complete Course)

This is another complete PHP course that walks you through the basics. As with the other courses, it covers everything – variables, operators, loops, functions, arguments, MySQL, object oriented programming, sessions and cookies, error handling and security. It even includes two tutorials for building sample applications – such as a simple web application and an RSS news aggregator. Similarly to the other complete courses, this one will take at least a couple of days to read, learn, and revise.

PHP 101: PHP For the Absolute Beginner →

MySQL PHP Tutorial

The tutorials so far include sections on MySQL and how to use it with PHP, but since PHP and MySQL are used together [almost] all the time, it wouldn’t hurt to cover a tutorial that focuses solely on MySQL.

This tutorial explains how to create a new MySQL database, connect to it, create users and give them permissions, write a simple script, create and populate a database, retrieve data, escape characters, print column headers, count fields and rows, write and read images, and use transactions.

The following is a simple PHP script example from the tutorial:


$host = "localhost"; 
$user = "user12"; 
$pass = "34klq*"; 

$r = mysql_connect($host, $user, $pass);

if (!$r) {
    echo "Could not connect to server\n";
    trigger_error(mysql_error(), E_USER_ERROR);
} else {
    echo "Connection established\n"; 

echo mysql_get_server_info() . "\n"; 



If you are already familiar with the SQL syntax this tutorial should only take you 2-4 hours.

MySQL PHP Tutorial →

PHP OOP Tutorial from Beginner to Advance

This multipart tutorial series focuses on PHP from the object-oriented programming (OOP) point of view. It starts nice and gently, so even if you are a beginner to both PHP and OOP, you will be able to follow along easily. The first part covers the basic concepts of OOP, such as objects, abstraction, inheritance, encapsulation, and polymorphism, but the following parts delve much deeper.

This tutorial will take you no more than 15 minutes (including the time you need to test the examples). However, the following tutorials in the series are much longer and more complicated, so for each of them you might want to devote half an hour or more.

PHP OOP Tutorial →

List Files and Directories with PHP

Lists of files and directories are very common in web development. This tutorial will show you how to list files and directories with the glob() function, a combination of the opendir()readdir() and closedir() functions, and the scandir() function. You will also learn some advanced file/directory listing techniques – SPL iterators, such as the FilesystemIterator, the RecursiveDirectoryIterator, and the GlobIterator.

The tutorial isn’t as complex as it might at first seem, but you probably should budget at least 45 minutes to complete it. It could even take longer, if everything is not working as expected and you need to make some fixes.

List Files and Directories with PHP →

Creating Your First PHP Application

We are definitely way beyond the basics with this tutorial. In fact, it’s a series of tutorials that cover the following:

Part 1 – Setting up the project and creating your first class:

  • Creating an outline of the project
  • Setting up your files and folders
  • Creating a class to handle database operations: DB.class.php

Part 2 – Building the rest of the backend:

  • Creating a User class
  • Creating a UserTools class
  • Registration / Logging in / Logging out

Part 3 – Building the frontend:

  • Forms
  • Form Handling
  • Displaying session data

As you can see this is a large tutorial, so budget at least a couple of days to complete it.

Creating Your First PHP Application →

Automatic CSS3 Prefixer and Compressor Tutorial

CSS files are text files but they can be very large. That is why they will benefit from some compression. Additionally, instead of writing all CSS3 properties with browser-specific prefixes by hand, this can be automated with PHP.

Automatic CSS3 Prefixer and Compressor php Tutorial

This tutorial will teach you exactly how to do this: Generate CSS3 properties with browser-specific prefixes, how to concatenate all the CSS files to save space and reduce load time, and how to do both automatically when a web page is requested.

The estimated time to complete the tutorial is about an hour.

Automatic CSS3 Prefixer and Compressor Tutorial →

Create Your Own Captcha in PHP

This short tutorial has been written in a typical programmer’s fashion, meaning it has little to no explanation, short to missing comments, and the assumption that everything is obvious and clear. However, aside from this, it is a useful tutorial and the slightly more advanced programmers might love it just because it uses few words and plenty of code.

Create Your Own Captcha in PHP tutorial

The tutorial is short, so it won’t take you more than 20 minutes.

Create Your Own Captcha in PHP →

Getting Started with PHP Regular Expressions

And now a tutorial on everybody’s favorite: regular expressions. Unfortunately for everybody who hates them, regular expressions are pretty useful, though often you can bypass them with other techniques.

Create Your Own Captcha in PHP tutorial

The tutorial in the link explains what regular expressions are, the Perl compatible regular expressions, the basic syntax of PHP regular expressions, how to use regular expressions in PHP, useful regex functions. Additionally, the tutorial includes a cheat sheet where all the basic stuff is gathered in one neat place.

The tutorial could take you an hour or two to complete but this depends on your familiarity with regular expressions. If you are a total stranger to them, expect to read some sections multiple times and, naturally, this will take you much more time.

Getting Started with PHP Regular Expressions →

Simple Banner Rotator With PHP, jQuery & MySQL

This tutorial goes beyond PHP, but since in real life that is exactly what you need, that is why the tutorial is included here. First you need to create the database schema, then the XHTML code, then the CSS, and only after that you will move on to the PHP side of things.

Simple Banner Rotator With PHP tutorial

The tutorial will take you at least 2 hours to complete, and that is if you don’t have to make a lot of modifications to the code.

Simple Banner Rotator With PHP, jQuery & MySQL →

Build a CMS in an Afternoon with PHP and MySQL

If we are honest here, this tutorial will probably take you more than an afternoon to complete. Having said that, it also isn’t as hard as it seems. In order to create the CMS, you do need to be familiar with the SQL syntax and MySQL, so if you do lack knowledge in these areas, first check the tutorials that teach MySQL above and then come back to this one.

Build a CMS in an Afternoon with PHP and MySQL

The CMS you will be learning to build will have all of the basic features you would expect from a CMS.

The frontend will have:

  • Homepage with the 5 most recent articles
  • Article Listing Page (archives), where snippets of all articles are displayed
  • A "View Article" page (single post), where visitors can read the entire article

The backend will have:

  • Admin login/logout
  • List of all articles
  • Add a new article
  • Edit an existing article
  • Delete an existing article

Build a CMS in an Afternoon with PHP and MySQL →

PHP Script Image of the Day

This tutorial shows you how to create a PHP script image of the day. All you need to do is find today’s date (with the help of the datefunction), store the value in the "$today" variable, and compare $today with the name of the day. Then you display the message "Today is " … " (you can modify the message, of course), together with the image of the day.

PHP Script Image of the Day

The estimated time for the completion of the task is about 10 to 15 minutes. This however doesn’t include the time to search for the images to display every day, so you may want to prepare them in advance.

PHP Script Image of the Day →

PHP is fun, and it can be used for so many tasks. These tutorials won’t make you a PHP guru, but they will help improve your skills and hopefully allow you to develop more complex PHP applications.