8 | Conditions & Control Structures in PHP | 2023 | Learn PHP Full Course for Beginners

preview_player
Показать описание
In this PHP tutorial I will show you how to branch your code using control structures. 🙂 Control structures include conditions such as if, else if, and else statements, as well as the switch statement. We also have the new match statement, which was included in PHP 8, which I will cover in this video.

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon and YouTube Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

Комментарии
Автор

I started to learn how to code with your videos back in 2020. I do it only as a hobby, so I take long breaks between projects and forget a lot of things. I always ended up back in your channel every time I want to do something new. That's why I wanted to thank you for such wonderful videos!

This is my first time hearing about the "match()"' condition, and I'm in love with it! I usually use so many "if-elseif-else" just to change little things, like the colour of the text depending a number, but now I can do tiny lines with the "match()". Thank you for teaching us even newest ways to improve our codes! :D

Elena-rrdu
Автор

Hi Dani! I've been watching your videos non-stop the past few days. You're the best teacher on this sort of thing, I swear. I can just grasp things with you that I find harder to grasp with others.

I will forever be grateful for these informative and helpful videos. 🙏 I hope you continue to make more video lessons. It's also really engaging the way you teach.

For a suggestion could you maybe show how a website would look when you apply certain changes? The way you teach is super helpful but it would also be nice to follow along to visually see the change or maybe little ms paint drawings as demonstration lol. If you have a few videos like/or on that I might have missed them so I'm sorry!

But nonetheless I literally always come to you for my go-to for coding. You're the best and I literally can't say that enough. Thank you!

kittencollector
Автор

This "match()" thing looks very useful, thanks bro !

vbxslsp
Автор

Another fantastic presentation! I can't remember smiling this much while learning, Dani. Your style just makes for terrific education all-around. After multiple degrees, decades in academia and many, many other learning endeavors, I would place your teaching skills at the very top. I never expected this to be fun - THANK YOU SO MUCH for making these videos. They have made a tremendous impact in many folks' lives, obviously! Cheers, man!

fissionchips
Автор

I really love the way you teach us. Very fantastic presentation thank you so much for making these videos!.

VargasForth
Автор

thank you dani, you give me a what is definition of switch and if and match statement clearly, that is very helpful love you!

ewemzyy
Автор

Ty very much for the informative series on PHP. I come from the MERN stack and felt that it was time to learn another language. Looking forward to do a few test projects and learn Laravel at some stage. :)

Lkacitron
Автор

Well done Dani. Your teaching and video skills are getting better all the time. Thanks for all your hard work :)

ShawnRitch
Автор

Awesome tuto.
Can you share us how to create a Router class that maps the incoming request URL to a specific controller method. 😚

lahoucineoldakdim
Автор

I learned quite some stuffs here which were minimized in my Javascript course

borisndoh
Автор

The match one is new to me, I like it. Much better than a ternary.
I ALWAYS use trailing commas, I hate it that it breaks in json and am forced to not have them.

Stoney_Eagle
Автор

Hi Dani thnx alot for the gud work ur doing to help we young developers with the required knowledge and skills, we really appreciate and may the almighty God reward u abundantly

henrywalker
Автор

bro, you're a mix of Elon Musk with someone else i can't figure out now haha. Anyways, great content, thanks for that.

AleJFF
Автор

What should I do, if I want to use if..elseif...elseif..else in such a way that every single condition has to be cheched. Thanks! Your videos are instructive and helpful.

YvanDarcyIteriteka
Автор

Amazing job man! 😮 Your aim and conciseness to explain everything is admirable, I understood concepts that in JavaScript wasn't fully getting in an easy and clear way. Thank you so much for the effort on putting this quality content out there🙏 One question tho: Would it be possible to check for a range of numbers? For example in the case of something like this but well written:

$result = match($a) {
[1-20], [30-40] => "You lose",
[21-29] => "You win",
};

davidmolina
Автор

Dani Hope You are having a good time. Can you teach on how to write an Api with vanilla PHP?

millannyimbili
Автор

You look like Elon Musk for a quick glance lol. Nice tutorials by the way. Thanks!

hellofromiqbal