ad1

Full Guide of PHP Operators

Well since i started using PHP i am certainly having problems with the my equations,
But i don't want it to happen to you guys so i have made this guide for you guys so
so you guys out there don't need to look around like me.php-logo

Well i have made these guide,
If you have any more suggestion then please suggest them through thecomments.
If you like it useful then don't forget to BOOKMARK it . Thanks 

Arithmetic Operators


OperatorDescriptionExampleResult
+Additionx=2
x+2
4
-Subtractionx=2
5-x
3
*Multiplicationx=4
x*5
20
/Division15/5
5/2
3
2.5
%Modulus (division remainder)5%2
10%8
10%2
1
2
0
++Incrementx=5
x++
x=6
--Decrementx=5
x--
x=4

Assignment Operators


OperatorExampleIs The Same As
=x=yx=y
+=x+=yx=x+y
-=x-=yx=x-y
*=x*=yx=x*y
/=x/=yx=x/y
.=x.=yx=x.y
%=x%=yx=x%y

Comparison Operators


OperatorDescriptionExample
==is equal to5==8 returns false
!=is not equal5!=8 returns true
<>is not equal5<>8 returns true
>is greater than5>8 returns false
<is less than5<8 returns true
>=is greater than or equal to5>=8 returns false
<=is less than or equal to5<=8 returns true

Logical Operators


OperatorDescriptionExample
&&andx=6
y=3
(x < 10 && y > 1) returns true
||orx=6
y=3
(x==5 || y==5) returns false
!notx=6
y=3
!(x==y) returns true

Comments :

0 comments to “Full Guide of PHP Operators”

Post a Comment

addd

adtest

Powered by Blogger.

Blog Archive