WEBVTT

00:00.800 --> 00:03.770
I will call you back again to another video lecture in PHP.

00:03.770 --> 00:10.190
And in this video lecture, let's go ahead and uh, look at, uh, decision making statements known

00:10.190 --> 00:12.020
as if statement.

00:18.770 --> 00:24.650
So in PHP we have a decision making statement that is not as a if statement.

00:24.650 --> 00:29.030
And the if statement helps us to be able to give conditions.

00:29.030 --> 00:35.540
And in that way we make computer to actually be creative in executing programs.

00:35.870 --> 00:39.920
So I have this little write up I put down here.

00:39.920 --> 00:43.610
I said I want to become a full stack developer.

00:43.970 --> 00:55.580
Then the first condition is if I learn PHP, I will become a back end developer, else I will remain

00:55.610 --> 00:57.860
a front end developer.

00:57.860 --> 00:59.960
So there is a two conditions right in here.

01:00.950 --> 01:04.980
If I learn PHP, I will become a back end developer.

01:06.240 --> 01:08.820
Else I will remain a front end developer.

01:08.850 --> 01:16.860
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

01:16.860 --> 01:20.010
to actually put this into practice.

01:20.670 --> 01:25.140
No I'll go ahead and create a variable.

01:25.140 --> 01:32.940
And I'm going to name this to be is called this to be is back end.

01:34.080 --> 01:36.990
Or let's go ahead and call it to be is p p.

01:39.240 --> 01:39.660
All right.

01:39.660 --> 01:42.360
So if PHP is there we check.

01:42.360 --> 01:46.260
Maybe if it is true then is a back end developer.

01:46.950 --> 01:52.710
So let's go ahead and say if and then we'll go ahead and say if.

01:53.160 --> 02:00.690
And the URL is always puts the dollar sign is PHP.

02:01.170 --> 02:06.280
And we'll go ahead and give the condition equal.

02:07.960 --> 02:09.940
So it's good to be.

02:11.050 --> 02:13.810
You are a back.

02:16.060 --> 02:18.070
End developer.

02:18.820 --> 02:21.340
So let's go ahead and save this.

02:21.580 --> 02:24.760
And we go ahead and refresh this and check it out.

02:24.850 --> 02:27.130
You are a back end developer.

02:27.130 --> 02:29.680
So if this is false.

02:29.710 --> 02:32.440
Let's go and see if this is false.

02:32.860 --> 02:36.610
Save this and nothing is being done.

02:36.610 --> 02:42.910
So if is PHP is equal to true you are a back end developer.

02:42.940 --> 02:50.920
Now when it is false, then we can go ahead and say else and we'll go ahead and put our code right in

02:50.920 --> 02:51.520
here.

02:51.670 --> 02:53.800
Go ahead and say equal.

02:55.570 --> 03:06.470
And it's going to be you are a front end Developer.

03:07.460 --> 03:07.940
All right.

03:07.940 --> 03:09.590
Let's go ahead and refresh and check it out.

03:09.620 --> 03:11.750
You are a front end developer.

03:11.750 --> 03:19.370
So if the PHP is true again and check it out, you are a back end developer.

03:20.000 --> 03:29.780
So now what if we go ahead and see when we have is HTML.

03:32.120 --> 03:34.160
Is HTML.

03:37.100 --> 03:38.210
CSS.

03:38.780 --> 03:42.680
So and how can I just put this to be HTML.

03:42.680 --> 03:48.830
And the CSS we are going to be is ASC one for easy understanding.

03:48.830 --> 03:50.450
So we don't run into a problem.

03:50.480 --> 03:53.120
Let's go ahead and see is HTML.

03:53.120 --> 03:56.660
And let this be equal to true.

03:56.690 --> 03:59.660
And go ahead and put a semicolon and end.

03:59.660 --> 04:01.820
And now let's go ahead and refresh.

04:02.480 --> 04:04.250
You are a back end developer.

04:04.250 --> 04:08.460
So we are actually checking for East PHP.

04:08.550 --> 04:20.820
Now if we have what is called is true for PHP and HTML, that is what is going to be a full stack developer.

04:20.850 --> 04:23.100
Now we got to give a condition.

04:23.130 --> 04:25.590
Now let's go ahead and give this condition.

04:25.590 --> 04:30.150
And I'm going to say that this condition is going to be else.

04:34.290 --> 04:41.670
Now when my condition now which we inserted in between and that is going to be our equal.

04:41.670 --> 04:50.760
And it's going to say you are a full stack developer.

04:51.090 --> 04:51.720
All right.

04:51.750 --> 04:53.700
Let's go ahead and save this and refresh this.

04:54.690 --> 04:59.400
So it says is this an unexpected error and.

05:01.980 --> 05:05.220
Unexpected to come in line 13.

05:05.220 --> 05:08.790
And that is okay.

05:08.940 --> 05:15.770
What Or actually happened is that we joined in and we didn't give any condition and we move in.

05:15.770 --> 05:27.140
So is p, h p and the ampersand is HTML and CSS.

05:27.500 --> 05:33.860
So always put in your dollar sign and go ahead and put in your dollar sign.

05:33.860 --> 05:34.970
And let's save this.

05:34.970 --> 05:37.190
So I had other phrases to check it out.

05:37.220 --> 05:39.380
You are a back end developer.

05:40.460 --> 05:47.870
And uh the reason why this is, is because we still have this PHP to read in here.

05:47.960 --> 05:50.420
And uh, let's go ahead and see.

05:51.680 --> 05:54.440
I give it a condition and.

05:56.840 --> 05:57.830
Is.

06:00.080 --> 06:04.460
Test HTML and it's something we can actually put in here.

06:04.760 --> 06:05.600
Let me see.

06:05.810 --> 06:09.380
We put notes and a rest refresh.

06:09.410 --> 06:13.410
Say you are a full stack developer in Austin.

06:13.440 --> 06:17.280
So what this means is that this is not true.

06:17.730 --> 06:19.860
It's just like saying that this is AWS.

06:19.890 --> 06:20.610
Let's go back.

06:20.640 --> 06:21.330
We're in here.

06:21.330 --> 06:28.680
And, uh, within, if we put this to be false, it's going to affect the back end developer.

06:28.800 --> 06:30.150
It's called refresh.

06:30.180 --> 06:33.420
And we're going to have new front end developer.

06:33.450 --> 06:37.290
So when we have both of them true.

06:37.320 --> 06:40.440
That is when we have front end first time developer.

06:40.470 --> 06:49.200
But if we go over here and I say that this is not true, that is the first statement we give any of

06:49.200 --> 06:49.440
them.

06:49.440 --> 06:53.670
Not the not condition makes this to be negative.

06:54.330 --> 06:55.050
You understand?

06:55.080 --> 07:01.260
Now I have changed this again to to be true and save.

07:01.260 --> 07:02.550
These are refresh.

07:02.580 --> 07:10.410
You are a full stack developer because it is only the else if statement that shows that is true and

07:10.410 --> 07:12.670
that is HTML, CSS is true.

07:12.670 --> 07:15.760
That means you are a full stack developer.

07:15.790 --> 07:16.390
What?

07:16.420 --> 07:24.760
When you have the if statement when we have is PHP true and the is HTML and CSS not true?

07:24.790 --> 07:26.860
This means not true.

07:26.890 --> 07:30.010
That means you are a back end developer.

07:31.750 --> 07:37.030
So your PHP is true was CSS is not true.

07:37.060 --> 07:38.770
You are just a back end developer.

07:38.800 --> 07:43.180
Well, when we have just only HTML is true.

07:43.210 --> 07:46.240
That means you are a front end developer.

07:47.560 --> 07:58.270
So if we go right in here and change the HTML, the is PHP to be false.

07:58.540 --> 08:00.460
Can I save this on a fresh?

08:00.670 --> 08:03.010
You are a front end developer.

08:03.640 --> 08:06.280
So you can see that now.

08:06.280 --> 08:07.270
I hope that is cool.

08:07.300 --> 08:10.930
And this is a way in PHP you can use the if statement.

08:10.930 --> 08:16.730
So we're going to do more with this because this is just an interrupt your path to power decision making

08:16.730 --> 08:18.320
statement in PHP.

08:18.440 --> 08:23.510
So in that way we can actually do so many things.

08:23.570 --> 08:26.570
You can actually change this to maybe like or.

08:26.870 --> 08:33.230
So if any one of these is then you can actually say UI full stack developer.

08:33.230 --> 08:36.710
But that is not really you see that is a full stack developer.

08:36.710 --> 08:40.880
But for you to be a full stack developer, both of them must be true.

08:40.910 --> 08:45.410
You must have the knowledge of the front end and the back end.

08:45.440 --> 08:46.070
All right.

08:46.070 --> 08:51.230
So if you have only the knowledge of the front end, you are your front end developer.

08:51.230 --> 08:56.540
If you have only the knowledge of the back end, you are a back end developer.

08:56.750 --> 09:00.740
So if you have both knowledge you are a full stack developer.

09:00.740 --> 09:02.060
So all right is cool.

09:02.060 --> 09:03.440
So go ahead and put it down.

09:03.440 --> 09:04.250
Practice with it.

09:04.250 --> 09:09.320
And if you have any question please go ahead and use the question and answer section.

09:09.320 --> 09:11.960
And I'm going to get back to you as soon as possible.

09:11.990 --> 09:12.980
Thank you so much.

09:12.980 --> 09:16.550
And I'm going to see you in the next video lecture.
