I will call you back again to another video lecture in PHP.
And in this lecture we go ahead and look at data types in PHP.
So in the previous lecture we are able to look at variables.
And during the time we are treating variables we talked about strings and we talked about integers.
We didn't go deep into them because we have not discussed about data types.
So what are data types in PHP?
In PHP we are going to specify ten.
In PHP that we are going to use certain uh informations.
And these informations are either stored as strings or integers or fluids or a boolean.
So let's go ahead and look at strings.
Let's go ahead and see.
This is a string.
And uh this string I just wrote right in here we are going to pass this string into a variable, and
then we use double quotation mark to actually say that this is a string.
So whatever is inside double quotation mark is a string.
So I'll go ahead and delete this.
And I'm going to create a variable.
And I'm going to say this is a my string.
Remember this is a variable.
So you can name it anything.
So I just say my string.
Okay.
Now I will go ahead and put a double quotation mark or I'll go ahead and use single quotation mark.
Because when I is a string, the string will either be either in a double quotation mark or a single
quotation mark.
Let's go ahead and start with single quotation mark.
And I'm going to say this is a welcome to PHP.
Then put a semicolon at the end and then we'll go ahead and encode this.
So let's go ahead and echo this.
And I'm going to just say echo my string and put a semicolon at the end.
And then let's go ahead and run this and check it out.
We come to FB so you can see that string can either be in a double quotation mark or a single quotation
mark.
So when we've discussed about variables we put everything inside double quotation mark.
But now I've just made that to be a single quotation mark.
So it is either a double quotation mark or it is either in single quotation mark.
Now the next one we're going to talk about is integers.
Integers are just numbers.
You can either use any number a whole number.
So one of whenever we talk about whole numbers we talk about integers.
All right.
Now let me go ahead and create this.
And I'm going to see my gnome.
So the variable name is just my gnome okay.
And now once you want if you want to write an integer is going to be just a whole number.
All right.
And let's go ahead and equal this out.
So my my gnome All right.
And we have to write a code and then put a semicolon at the end and run this.
And you can see we have this 60.
Uh, this is a 67.
All right.
Now I want this to move to the next line.
You can actually go right in here and, uh, put a code and then brick because we are using HTML right
here.
Now let's go ahead and run this.
You can see that this has moved to the next line.
So you can place this in uh, maybe inside this my string or you put that inside here.
All right.
So I don't want this to be equal everywhere.
I'll go ahead and copy this.
I'll go ahead and delete this.
All right.
Now I have my string and I'm going to put this here.
Now, if I run this code, I'm going to.
Oh I got an error right in here.
So that is equal my string.
So what I need to do is that I have to place this right inside this double quotation mark.
So let me go ahead and take everything out.
Quotes right inside.
Double quotation mark now.
Oh I'm having this problem.
Okay.
Now I put everything right inside the double quotation mark and I'll go ahead and run my code again.
Welcome to PHP.
And you can see the line break is already here and it has moved to the next line 6 to 7.
So now we have our integer.
I'll have to bring the next one is a decimal numbers.
So decimal numbers are different from whole numbers.
So if you go ahead and say dollar sign my.
My decimal.
So let's go ahead and say this is equal to 67.03 semicolon at the end.
Now PHP actually knows that 67 is quite different from 67.0.
So 67 Seven is quite different from 67.0.
The first one is an integer, while the second one is a float.
All right, this is my decimal and not NY.
So you can actually go ahead and practice with these.
So the first one here is called a an integer right.
And last one is called a float number.
So the next one is boolean.
Let's go ahead and say we have a.
This code is my bull.
So we can call this my boolean.
All right.
So this is equal to true or false.
It is either it is true or it is either a false.
All right.
So it is either true or it is either a false.
Okay.
So whenever we are going to use this we're going to always let you know when and when to use it in the
program.
So as we move into PHP we're going to make use of all these data types.
Because whenever you are writing PHP code, you're always going to use data types to actually make your
code to be manageable.
All right, now that's all PHP actually outputs.
And that is called null.
All right.
So null is actually there for you to send no value.
No means no value.
All right.
So I hope you understand this.
No means no value.
All right.
These things are these are going to use to make our code to be functional.
It helps us to write code that are functional.
So you always use strings.
You always use data types.
And the data types are going to use a string.
Integers or decimal numbers Boolean and so on.
So this is just an introduction to data types.
I'll move into the course.
We're going to discuss more on that.
And if you have any questions please go ahead and use the questions 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.