:::

5. if / else statement

In addition to doing something when the condition is true, we can do something else if the condition isfalse. We can do this using an if /else statement:

<?php
  $name = "Edgar";

  if ($name == "Simon") {
    print "I know you!";
  }
  else {
    print "Who are you?";
  }
?>

:::

語系選擇