Check day of the week in if statement in PHP

Description

The following code shows how to check day of the week in if statement.

Example


<?php/* www .  j  a  v a2  s  .c  o  m*/
  if(date("D") == "Mon")
  {
    print("Remember to put the trash out.");
  }
?>




















Home »
  PHP Tutorial »
    Language Basic »




PHP Introduction
PHP Operators
PHP Statements
Variable
PHP Function Create
Exception
PHP Class Definition