I will call you back again to another video lecture in PHP.
And in this video lecture, let's go ahead and uh, look at, uh, decision making statements known
as if statement.
So in PHP we have a decision making statement that is not as a if statement.
And the if statement helps us to be able to give conditions.
And in that way we make computer to actually be creative in executing programs.
So I have this little write up I put down here.
I said I want to become a full stack developer.
Then the first condition is if I learn PHP, I will become a back end developer, else I will remain
a front end developer.
So there is a two conditions right in here.
If I learn PHP, I will become a back end developer.
Else I will remain a front end developer.
Now let's go ahead and move on to sites dot PHP, and let's go ahead and use the if else or the if condition
to actually put this into practice.
No I'll go ahead and create a variable.
And I'm going to name this to be is called this to be is back end.
Or let's go ahead and call it to be is p p.
All right.
So if PHP is there we check.
Maybe if it is true then is a back end developer.
So let's go ahead and say if and then we'll go ahead and say if.
And the URL is always puts the dollar sign is PHP.
And we'll go ahead and give the condition equal.
So it's good to be.
You are a back.
End developer.
So let's go ahead and save this.
And we go ahead and refresh this and check it out.
You are a back end developer.
So if this is false.
Let's go and see if this is false.
Save this and nothing is being done.
So if is PHP is equal to true you are a back end developer.
Now when it is false, then we can go ahead and say else and we'll go ahead and put our code right in
here.
Go ahead and say equal.
And it's going to be you are a front end Developer.
All right.
Let's go ahead and refresh and check it out.
You are a front end developer.
So if the PHP is true again and check it out, you are a back end developer.
So now what if we go ahead and see when we have is HTML.
Is HTML.
CSS.
So and how can I just put this to be HTML.
And the CSS we are going to be is ASC one for easy understanding.
So we don't run into a problem.
Let's go ahead and see is HTML.
And let this be equal to true.
And go ahead and put a semicolon and end.
And now let's go ahead and refresh.
You are a back end developer.
So we are actually checking for East PHP.
Now if we have what is called is true for PHP and HTML, that is what is going to be a full stack developer.
Now we got to give a condition.
Now let's go ahead and give this condition.
And I'm going to say that this condition is going to be else.
Now when my condition now which we inserted in between and that is going to be our equal.
And it's going to say you are a full stack developer.
All right.
Let's go ahead and save this and refresh this.
So it says is this an unexpected error and.
Unexpected to come in line 13.
And that is okay.
What Or actually happened is that we joined in and we didn't give any condition and we move in.
So is p, h p and the ampersand is HTML and CSS.
So always put in your dollar sign and go ahead and put in your dollar sign.
And let's save this.
So I had other phrases to check it out.
You are a back end developer.
And uh the reason why this is, is because we still have this PHP to read in here.
And uh, let's go ahead and see.
I give it a condition and.
Is.
Test HTML and it's something we can actually put in here.
Let me see.
We put notes and a rest refresh.
Say you are a full stack developer in Austin.
So what this means is that this is not true.
It's just like saying that this is AWS.
Let's go back.
We're in here.
And, uh, within, if we put this to be false, it's going to affect the back end developer.
It's called refresh.
And we're going to have new front end developer.
So when we have both of them true.
That is when we have front end first time developer.
But if we go over here and I say that this is not true, that is the first statement we give any of
them.
Not the not condition makes this to be negative.
You understand?
Now I have changed this again to to be true and save.
These are refresh.
You are a full stack developer because it is only the else if statement that shows that is true and
that is HTML, CSS is true.
That means you are a full stack developer.
What?
When you have the if statement when we have is PHP true and the is HTML and CSS not true?
This means not true.
That means you are a back end developer.
So your PHP is true was CSS is not true.
You are just a back end developer.
Well, when we have just only HTML is true.
That means you are a front end developer.
So if we go right in here and change the HTML, the is PHP to be false.
Can I save this on a fresh?
You are a front end developer.
So you can see that now.
I hope that is cool.
And this is a way in PHP you can use the if statement.
So we're going to do more with this because this is just an interrupt your path to power decision making
statement in PHP.
So in that way we can actually do so many things.
You can actually change this to maybe like or.
So if any one of these is then you can actually say UI full stack developer.
But that is not really you see that is a full stack developer.
But for you to be a full stack developer, both of them must be true.
You must have the knowledge of the front end and the back end.
All right.
So if you have only the knowledge of the front end, you are your front end developer.
If you have only the knowledge of the back end, you are a back end developer.
So if you have both knowledge you are a full stack developer.
So all right is cool.
So go ahead and put it down.
Practice with it.
And if you have any question please go ahead and use the question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.