PHP For Beginners | 3+ Hour Crash Course

21
Published on July 12, 2022 by

Your first step in learning PHP. We will go over all of the fundamentals and create a small PHP/MySQL project.

⭐ Sponsor:
https://linode.com/traversy

💻 Github Repo:
https://github.com/bradtraversy/php-crash

💻 Download Xampp:
https://apachefriends.com

👇 PHP OOP MVC Udemy Course:
https://www.udemy.com/course/object-oriented-php-mvc

💖 Show Support
Patreon: https://www.patreon.com/traversymedia
PayPal: https://paypal.me/traversymedia

👇 Follow Me On Social Media:
Twitter: https://twitter.com/traversymedia
Instagram: https://www.instagram.com/traversymedia
Linkedin: https://www.linkedin.com/in/bradtraversy

Timestamps:
0:00 – Intro
0:59 – Linode Sponsor
1:40 – Slides
9:47 – Getting Setup With XAMPP
14:30 – Opening a PHP File
15:38 – VS Code Setup & Auto Reload
18:20 – Output Constructs & Functions
26:35 – Data Types & Variables
34:32 – Arrays
42:05 – Conditionals
52:57 – Loops
1:02:00 – Functions
1:09:47 – Array Functions
1:24:15 – String Functions
1:30:28 – Superglobals
1:34:05 – $_GET & $_POST
1:40:56 – Sanitizing Inputs
1:45:24 – Cookies
1:49:10 – Sessions
1:58:45 – File Handling
2:03:48 – File Uploading
2:17:20 – Erros & Exceptions
2:22:05 – OOP & Classes
2:35:14 – Feedback App Project
2:38:15 – Including PHP Pages
2:42:23 – Database & Feedback Table Setup
2:48:45 – Connecting To MySQL
2:53:54 – If & Foreach Shorthands
2:58:11 – Fetch From Database
3:01:05 – Inserting Data From a Form

Category

Add your comment

17 Comments

  • Zack-C 2 months ago

    Great job bro!

  • Tiến Nguyễn Văn 1 month ago

    Thank you for your explainations :x. I just have a confuse about the way you called parameters and arguments. I had some basic knowledge in JS learned at W3school, and they define that "Function parameters are the names listed in the function definition.

    Function arguments are the real values passed to (and received by) the function."
    It is opposite with your opinion, I do not know it is different in PHP or just the way we call.

  • Vítor Bortolotti 1 month ago

    Thanks, Brad! I really appreciate you.

  • videoviewer502 1 month ago

    Awesome introduction

  • mohamedAmine rg 1 month ago

    great coourse thanks brad!

  • Adeyemi Blessing 1 month ago

    Hey Traversy, thanks for the tutorial. Around the start of the video, you said PHP was the first language you learnt to build anything of value, what was the first language you learned then?

  • Holy CrusaD3R 1 month ago

    how do I turn on in-browser logs in phpstorm?

  • Nik Schlein 1 month ago

    In lesson 14, if you run across the error "Failed to open stream: Permission denied" on Ubuntu 22.04 desktop, you need to do the following:

    1.) add the line echo exec('whoami'); to your file [this will show you the user executing the PHP]
    2.) sudo chmod USER_FROM_#1 /directory/where/you/are/writing/the/file/to/
    3.) sudo chmod 755 /directory/where/you/are/writing/the/file/to

  • Richard Evans-Lacey 1 month ago

    Thank you. The bit about reporting errors was really useful … no more hunting for hours for a missing bracket!

  • Python 360 1 month ago

    Nice tutorial man, first used php3, good to see the newer additional functions and features

  • Michael Olowe 1 month ago

    The age jokes🤣😭

  • William Castro 1 month ago

    Have a really hard time launching XAMP or MAMP onto my MacBook Air (M1, 2020) version. Is there a site where you can just run the Php code so you can learn how the syntax is written? I already know my fundamentals with JavaScript. But I would like to get straight to learning how to code in Php and afterwards I will somehow fix the setup of my environment, thanks and appreciate the course.

  • Reuben B 1 month ago

    I'm confused, can somebody please double check the difference between parameters and arguments? I saw a post about this on stackoverflow and it is opposite to what is said here. Nevertheless, thank you for a recent and good php crash course! 🙂

  • Oficina do Ardito 1 month ago

    This tutorial is golden! Thank you very much!

  • Rudy Romero 1 month ago

    When incrementing with while loops you can just simply increment the variable x within the string concatenation.
    while($x <= 15){echo 'number: '.$x++.'<br>';}
    instead of separately specifying that you want to increment x on a new line.

  • yelimsnusm 1 month ago

    i love ur vids

  • Shaira Lee Pepaño 1 month ago

    awesome, i have learned and gonna do more PHP dev. Thank you