Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

want to print full Name of the day

Tags:

People also ask

How to get today day name in php?

Example 1: PHP Get Day Name from Date$newDate = date('l', strtotime($date));

What is Strtotime PHP?

The strtotime() function parses an English textual datetime into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 GMT). Note: If the year is specified in a two-digit format, values between 0-69 are mapped to 2000-2069 and values between 70-100 are mapped to 1970-2000.


I want to print name of the day giving numbers from 1 to 7.

Ex:

<?php
 echo date("1");
?>

and want to get output as Monday. But it prints 1.

Can any one help me?