Friday, April 25, 2014

Conditionals and Control Flow - 4/4 - codeacademy.com

Instructions:
  1. If your condition is true, your code should echo "The condition is true"
  2. Otherwise (else) when it is false, your code should echo "The condition is false".
  3. Make sure your condition evaluates tofalse, so that your program prints out "The condition is false".

<html>
  <head>
  </head>
  <body>
    <p>
      <?php
        $trueOrfalse = "true";// Write your if/elseif/else statement here!
        if ($yourName == "false") {
            echo "The condition is true";
        }
        else {
            echo "The condition is false";
        }
     
      ?>
    </p>
  </body>
</html>

No comments:

Post a Comment