PHP if statement
From the menu go to: Insert > PHP Tags >if.

If statements are used to compare two values and carry out different actions based on the results of the test. If statements take the form if, then, else. Basically the if part checks for a condition. If it is true, the then statement is executed. If not, the else statement is executed.

Example:

<?php
   if (weather == rain){
      echo "take umbrella";
      } else {
     echo "take sun screen";
   }
?>

See also:
What is PHP?
Tutorials