Tag Archives: Application Services

PHP Increment/decrement Operator

Incrementing and Decrementing Operators There are two types of incrementing and decrementing operators, post incrementing/decrementing operators and pre incrementing /decrementing operators. Post incrementing operators are placed after a variable name, and pre incrementing /decrementing operators are placed before the name. Operator Usage Output Post incrementing $a++; Returns the value of $a and then adds 1 to the value… Read More »

PHP Comparison Operator

Comparison Operators This operator is used to compare two given values. Name Symbol Usage Description Equal to == $a==$b The value of $a is equal to the value of $b. Not equal to != $a != $b The value of $a is not equal to the value of $b. Less than < $a <$b The value of… Read More »

PHP Assignment Operator

Assignment Operators Assignment operators are use to assign a specific value to variable. They are also use to change the existing value of a variable by adding or subtracting from the variable ‘s current value. A few examples are =, +=, -= and .=. In PHP you can use more than one assignment operator in a single… Read More »

PHP Arithmetic Operator

Arithmetic operators Arithmetic operators are used to perform elementary mathematical calculation and are used when value of variable declare in integer type. Name Example Output Addition $a+$b The sum of $a and $b Subtraction $a-$b The difference between $a and $b Multiplication $a*$b The product of $a and $b Division $a/$b The quotient of $a and $b Modules $a%$b The remainder… Read More »

PHP Operators

Introducing Operators In the previous section you learned about variables, data type, and constant and how to declare them. However, to use or declare variables or constants you need operators. The fallowing problem and itssolution explain the use of operators. Identify the operators to be used Operators are an integral part of any programming language, they are symbol that represent a specific action.… Read More »