PHP if else

Last Updated: June 13, 2021

if statement can be used to do logical comparison.

Simple if statement

if($number > 10){
  echo "number is greater than 10";
}