If you solution for getting a day name from any past of future day, You are at right page of web.
Use below code.
<?php
$date = '12-Jul-2014'; // Use any valid PHP date format
$timestamp = strtotime($date);
echo 'Short Name of Day => '. $day = date('D', $timestamp); //Short Name of Day => Sat
echo '<br> Full Name of Day => '. $day = date('l', $timestamp); //Full Name of Day => Saturday
?>
Use below code.
<?php
$date = '12-Jul-2014'; // Use any valid PHP date format
$timestamp = strtotime($date);
echo 'Short Name of Day => '. $day = date('D', $timestamp); //Short Name of Day => Sat
echo '<br> Full Name of Day => '. $day = date('l', $timestamp); //Full Name of Day => Saturday
?>
No comments:
Post a Comment