The if...else statement


SUBMITTED BY: henry1874w

DATE: June 12, 2017, 4:09 p.m.

FORMAT: Text only

SIZE: 177 Bytes

HITS: 230

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $t = date("H");
  6. if ($t < "20") {
  7. echo "Have a good day!";
  8. } else {
  9. echo "Have a good night!";
  10. }
  11. ?>
  12. </body>
  13. </html>

comments powered by Disqus