php get day name from date code example
Example 1: php get day from date
$timestamp = strtotime('2009-10-22');
$day = date('D', $timestamp);
var_dump($day);
Example 2: get day from date php
echo date("l") . "<br>";
Example 3: name of today php
$datetime = DateTime::createFromFormat('YmdHi', '201308131830');
echo $datetime->format('D');
$date = new \DateTime();
echo $date->format("D");
Example 4: php date
<?php
date_default_timezone_set('UTC');
echo date("l");
echo date('l jS \of F Y h:i:s A');
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
echo date(DATE_RFC2822);
echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>