# Lesson 6 – PHP Comparison and Logical Operators

Operators in PHP help you perform different types of tasks and functions on data. We have already used arithmetic operators in PHP Mathematics lesson. In the following lines, we take a look at the main types of operators in PHP.

## Arithmetic Operators

These operators enable you to perform mathematical operations in PHP. Following is a complete list of arithmetic operators.

Let suppose we have two variables, \$num1 and \$num2 with values of 5 and 10 respectively. 5 and 10 in this example are known as operands.

## Comparison Operators

Comparison operators help you compare two values or statements in PHP. There are quite a few comparison operators in PHP.

Let suppose we have two variables, \$num1 and \$num2, with values of 5 and 10 respectively.

## Assignment Operators

As the name suggests, we use assignment operators to assign values to variables and arrays. Here is a complete list of assignment operators in PHP.

Let suppose we have two variables, \$num1 and \$num2, with values of 5 and 10 respectively.

## Logical Operators

Logical operators check whether or not a condition is true.

Let suppose we have two variables, \$num1 and \$num1, with values of 5 and 10 respectively.

In the next lesson, we will study Decision Making or Conditional Statements in PHP.