Thursday 7 August 2014

How to get the day name from the date in php

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
?>


No comments:

Post a Comment

List OF BANK PAN Numbers

List OF BANK PAN Numbers Bank/Home Loan Providers PAN Number Allahabad Bank AACCA8464F Andhra Bank AABCA7375C Axis Bank...