PHP divides the operators in the following groups:
Arithmetic operators
Assignment operators
Comparison operators
Increment/Decrement operators
Logical operators
String operators
Array operators
Conditional assignment operators
The PHP arithmetic operators are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication etc.
The PHP assignment operators are used with numeric values to write a value to a variable.
The basic assignment operator in PHP is "=". It means that the left operand gets set to the value of the assignment expression on the right.
The PHP comparison operators are used to compare two values (number or string):
The PHP increment operators are used to increment a variable's value.
The PHP decrement operators are used to decrement a variable's value.
The PHP logical operators are used to combine conditional statements.
PHP has two operators that are specially designed for strings.
The PHP array operators are used to compare arrays.
The PHP conditional assignment operators are used to set a value depending on conditions:
เกณฑ์การให้คะแนน ข้อละ 2 คะแนน