WEBVTT

00:00.530 --> 00:00.770
I will.

00:00.770 --> 00:08.030
Going back again to the end of the lecture in p p and in this video lecture we go ahead and look at

00:08.030 --> 00:10.790
uh, HTML and PHP.

00:17.420 --> 00:17.900
All right.

00:17.900 --> 00:20.480
So we're going to look at uh HTML and PHP.

00:20.480 --> 00:26.510
And then we go ahead and learn about how to use HTML in PHP.

00:26.840 --> 00:27.410
All right.

00:27.410 --> 00:34.460
So you can see that our when I actually printed out this we were able to print out Hello World.

00:34.460 --> 00:40.760
And if we go ahead on the inspect element of view the page source, this guy had a view page source.

00:40.760 --> 00:44.930
You can see that this is a HTML page.

00:44.930 --> 00:49.640
And right in here we can see our PHP code printed out.

00:49.670 --> 00:50.360
Hello world.

00:50.360 --> 00:56.480
And there is nothing like PHP and we can be able to write some HTML code right inside this PHP.

00:56.630 --> 01:02.060
And it can be used to execute that as a HTML file and not a PHP file.

01:02.090 --> 01:03.950
So is that actually possible?

01:03.950 --> 01:05.540
Yes, it is possible.

01:05.540 --> 01:07.200
So how is that possible?

01:07.230 --> 01:08.640
Let's go ahead and close this.

01:08.670 --> 01:09.720
But before, go ahead.

01:09.720 --> 01:17.730
To start this, I want to show you how this actually works for each time we, uh, run this on our server.

01:18.840 --> 01:24.060
So this is our server, which we actually used.

01:24.060 --> 01:28.740
And then remember that this server is always open until you finish everything you are doing.

01:28.740 --> 01:33.300
So anytime you are running your program, your server must always be open for you to run PHP.

01:33.360 --> 01:38.850
And you can see that it has some things like accept close, accept close, accept close.

01:38.850 --> 01:42.690
So each time you run this code, it's going to generate some of these figures.

01:42.690 --> 01:49.230
What actually happens is that PHP is actually, uh, being run and the server is actually working at

01:49.230 --> 01:49.920
the same time.

01:49.920 --> 01:52.110
Now I'm going to write some things here.

01:52.140 --> 01:56.760
Then we're going to run the code, we're going to check our server and know if actually there's some

01:56.760 --> 01:58.620
things working going on in the background.

01:58.620 --> 02:00.660
So this does not actually concern us.

02:00.690 --> 02:01.860
It's not our problem.

02:01.860 --> 02:03.360
We don't actually need it.

02:03.390 --> 02:07.710
We just want to make sure to know if our server is actually running very well.

02:07.740 --> 02:14.310
Now, for us to be able to write PHP and very well, we're going to learn about H2O.

02:14.310 --> 02:18.060
Just like I told you, you have to know a bit about HTML, right?

02:18.090 --> 02:21.510
So we are not actually learning HTML as to start afresh.

02:21.510 --> 02:27.810
We're going to write some HTML code right inside this PHP and it's going to execute that.

02:27.840 --> 02:34.830
Then go ahead and check our page source and know if that actually prints out the HTML code.

02:34.860 --> 02:37.920
Now we actually wrote Hello World.

02:37.920 --> 02:45.540
And what if I go right inside this hello world and make that to give that a heading tag of H1.

02:45.540 --> 02:50.550
And then let's go over here and call this uh h1.

02:50.580 --> 02:56.070
Now if you go ahead and run this, let's go over here and refresh this.

02:56.100 --> 02:58.860
You can see that this is Hello World.

02:58.860 --> 03:02.640
And you can see that it actually enlarged this.

03:02.670 --> 03:06.420
Now if I go ahead and check the pixels go ahead and view the page source.

03:06.420 --> 03:08.940
You can see we have H1 right in here.

03:08.940 --> 03:12.300
But previously it was actually Hello World.

03:12.300 --> 03:18.150
And because this HTML tag is right in here PHP recognizes HTML tag.

03:18.150 --> 03:20.170
That is very, very important.

03:20.200 --> 03:27.820
Let's go ahead and put someone at once and go ahead and say a call and uh, go ahead and uh, create

03:27.850 --> 03:29.710
a line right in here.

03:30.520 --> 03:34.510
And uh, go ahead and press semicolon at the end because you must actually do that.

03:34.510 --> 03:38.620
So go ahead and say echo again to print out anything.

03:38.620 --> 03:43.090
So anytime you want to print out anything with HTML, uh, anytime.

03:43.090 --> 03:46.810
Want to print out anything in PHP, you're going to use the word echo.

03:46.810 --> 03:50.950
So let's go ahead and put the paragraph tag and check this paragraph tag.

03:50.950 --> 03:58.240
So inside this paragraph tag I'm going to say welcome to PHP.

03:58.480 --> 03:58.960
All right.

03:58.960 --> 04:00.340
So go ahead and create a tag.

04:00.340 --> 04:06.040
And we're going to run this code save this code and uh go back here and uh run this.

04:06.040 --> 04:11.830
So now you can see I have Hello World and you can see the line which is h r which we created.

04:11.830 --> 04:14.710
And welcome to PHP is right in here.

04:14.740 --> 04:17.560
Now let's go ahead and inspect this element and check it out.

04:17.560 --> 04:19.540
So we.

04:19.570 --> 04:20.110
Okay.

04:20.140 --> 04:25.670
This is actually uh view page source and not inspection of element.

04:25.700 --> 04:28.790
I just want to see the back end and what is actually going on.

04:28.820 --> 04:30.080
So I'm viewing the pitch source.

04:30.110 --> 04:30.530
This guy.

04:30.530 --> 04:31.460
Let's check it out.

04:31.610 --> 04:35.450
So now you can see we have this red in here.

04:36.140 --> 04:39.680
I want to drag this up so it can be used to show more.

04:39.710 --> 04:43.760
It says demo the body right in here and you can see hello world.

04:43.790 --> 04:46.100
The hash one is here.

04:46.100 --> 04:48.380
And this is our line tag.

04:48.380 --> 04:50.240
And this is our paragraph tag.

04:50.240 --> 04:52.700
And we're going to PHP right inside there.

04:52.700 --> 04:56.450
So you can see that it was able to give us what is inside hello world.

04:56.450 --> 04:57.890
And it was able to give us.

04:57.920 --> 04:59.000
Welcome to PHP.

04:59.120 --> 05:03.380
And it was able to recognize the HTML tags.

05:03.380 --> 05:08.300
So you can actually write HTML tags right inside your PHP code.

05:08.300 --> 05:10.730
And the PHP will actually honor that.

05:10.730 --> 05:19.340
And it will go ahead and, uh, you know, execute your programs while obeying the HTML tags.

05:19.370 --> 05:19.910
All right.

05:19.940 --> 05:23.630
So now I'm going to show you our command prompt.

05:23.630 --> 05:25.370
This is our server run on the back end.

05:25.400 --> 05:31.850
You can see that the more we are running this code, the more this is being actually, Um, do some

05:31.880 --> 05:32.780
work on the back end.

05:32.810 --> 05:33.590
Let's go back here.

05:33.590 --> 05:37.250
And I'm going to run this code while keeping this right in here.

05:37.250 --> 05:38.510
So I'm going to run this code.

05:38.510 --> 05:42.290
So let's go ahead and check it out and see if actually anything works at the back end.

05:42.320 --> 05:43.760
So go ahead and refresh this.

05:43.760 --> 05:49.760
And for each time I refresh it you can see that it's being uh is accepted.

05:49.760 --> 05:53.720
And it's go over to the file and gets whatever is there.

05:53.720 --> 05:55.640
You can see the get command is here.

05:55.640 --> 05:57.230
It gets whatever is in the file.

05:57.260 --> 05:59.390
Go ahead and run this code again.

05:59.420 --> 06:02.750
You can see it gets whatever it is in the file.

06:02.780 --> 06:05.510
WW slash sites dot PHP.

06:05.510 --> 06:07.130
And that is really very cool.

06:07.130 --> 06:13.790
So when you are working uh, as a PHP developer, you actually know that your server is working and

06:13.790 --> 06:17.210
back end and making sure that everything is going well.

06:17.240 --> 06:17.690
All right.

06:17.690 --> 06:23.780
So I went ahead and did the code for you go ahead and practice this and put it on your own, check it

06:23.780 --> 06:28.370
out and try out the HTML or talks and make sure everything works fine.

06:28.370 --> 06:33.200
And if you have any questions, use the question and answer section and I'm going to get back to you

06:33.200 --> 06:34.130
as soon as possible.

06:34.160 --> 06:34.700
Thank you.

06:34.700 --> 06:37.190
And I'm going to see you in the next video lecture.
