Get today's day of the week in PHP

Description

The following code shows how to get today's day of the week.

Example


<html>//w  ww  .j  av  a 2  s. c om
<body>
<h1>
<?php
  $Today = date("l");
  if($Today == "Friday")
  {
    print("Thank goodness it's Friday!");
  }
  else
  {
    print("Today is $Today.");
  }
?>
</h1>
</body>
</html>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone