Rabu, 22 Juli 2015

PHP : How To Get Day Name By Date

This time I will give a simple example to get the name of the day by date in PHP. Function used is inherited from PHP, which is the date function.
Here is an example of how to do it.
<?php
$dayname_today = date("l"); // Day name of current date

$custom_date = "2015-07-22";
$custom_dayname = date("l",strtotime($custom_date)); // Day name of 2015-07-22 date
?>
Hopefully this short article help you, thank you.
Share it Please

1 komentar:

Copyright @ 2013 Web Attribute. Designed by Templateism | Love for The Globe Press