I will call you back again to end up with a lecture in PHP.
In this video lecture we go ahead and look at the maths operators.
So we are going to deal with maths.
And there are some operators that we need to be able to work with maths.
So let's go ahead and see.
Uh we are right into PHP.
We can actually go ahead and uh, do some things like calculations like say four plus one and uh, go
ahead and put a semicolon and then let's go ahead and refresh this.
You can see I have five right in here.
And it can actually say maybe four times five five.
That is four.
Multiply five.
And let's go ahead and say 20.
And what if we go ahead and divide that.
Go ahead and have a Eight.
Now we can know how to do some complex things like let me see, four plus five, multiply by by two,
and let's go ahead and run this code and check it out.
So what actually happens is that the multiplication was done first and then it adds.
So if you want to do this you can actually say put this one inside the brackets and it's going to be
four plus five multiplied by two.
Let's go ahead and refresh this.
And you can see I have 18 right in here.
So there are so many so many things I'm going to do is in the math operators.
So let me go ahead and say I'm going to add this inside a a variable and let the variable name be my
num.
All right.
So if I say my name is equal to let me say 15, then if I go ahead and equal my known.
Let me see my gnome then.
If you got a refresh, you can have 15 right in here.
So I can be able to do so many things.
Ready.
And now even the variable I can actually say maybe say uh, my gnome increment, then what it actually
means is that I want to add 1 to 15.
If I refresh this, you can see I have a 16.
And if I go ahead and say my known minus minus, I refresh, I have 14.
So there are so many things I want to do.
This actually is equal to me saying maybe my gnome minus one or my gnome plus.
Plus one.
So let's go to refresh this and see I have a 15 right in here because I have minus already in.
So if I go ahead and delete this, I'll refresh this.
I have 16.
So if I go ahead and say minimum minus one that is 14.
So there are so many things you can do.
Let me say I want to add some things right in here.
I got say my num.
Um, let me see my known loss ten.
Now this will actually give us a let's go ahead and save this.
Let's go ahead and remove this here.
All right.
So my number is equal to 15.
Then my num plus a ten.
Then all I need to do now is let's go here and say my unknown is going to be equal to my plus ten.
So I want to have 25.
Let's go ahead and run this.
And you can see I have 25.
All right.
So another way of doing this is actually saying that we have.
Instead of saying my norm is equal to my norm plus ten, I can actually see my norm plus equal ten.
And let's refresh this and have 25.
So if I say minus ten minus equal and that is five because 15 minus ten is five.
And if I go ahead and say minus one multiply by ten, that is 150.
So if I say my norm divide equal that is 1.5.
So you can see some of these things.
You can actually be able to do that using PHP.
and it is very, very easy.
Now I'm going to introduce you some to some of the muscle operators that are needed, which it can be
good to use by using simple functions.
And these functions are just a small snippets of code that we can actually call to perform some specific,
uh, functions or operations.
Operations in PHP.
So let's go ahead and introduce you to some of these muscle operators.
Let me say I have a.
I'm go ahead and delete this.
Okay.
Let me go ahead and delete this.
And let me say I have a call and I have what is called an absolute value.
So if I see this is absolute value so abs.
And then I'll go ahead and add negative sign right in here.
Let me say negative one.
Uh ten.
And if I refresh this I have positive ten output.
So that is the absolute value.
And what if I have I'll go ahead and comment on these then.
What if I have let me see a Q and A power of two by three?
So if I want to wish to part 2 to 3, that would give me eight.
If I refresh this, you can see I have eight right in here.
Now we have a square roots.
Um, let's go ahead and comment on this.
We have a square root and I go ahead and equal square root of uh, 8 to 1.
So let's go ahead and uh check it out.
That is nine.
So you can actually put square roots of anything in a skirt.
All right.
So there are some of these mass operators you can be able to use like a max Solomon and say equal max.
And then go ahead and say maybe ten and six.
And uh, it's going to give you the maximum number.
And that is ten.
So if you want to use the minimum number, you can actually see it coming.
And let's go ahead and check it out.
And that is six.
So there are so many math operators out there.
It can be put to use and play around with them.
And you can actually get something so cool.
All right.
So we have so many of them and they are like this.
So the flow uh the cosine, the sine, the tangent and so many more are there.
So we just need to go ahead and do so many results.
Check it out and play around with them because you might be using them anytime in your program.
And that is very cool.
So this is just introduce us to mass operators.
And you can be able to see what are what we can do in PHP using this mass operators.
For us to be able to know that PHP has this features in them.
All right.
So go ahead and play with this.
Check it out.
If you have any questions on this 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.