Thursday, November 16, 2017

If Statement in PHP


<?php

$num1 = 30;
$num2 = 40;

if($num1 > $num2){
  echo 'Num1 is greater than Num2!';
} else if($num1 == $num2){
  echo 'Num1 and Num2 are equal!';
}else{
  echo 'Num2 is greater than Num1!';
}

?>

No comments:

Post a Comment