How do I get the name of a day from a date in PHP?

How do I get the name of a day from a date in PHP?

$dateValue='2015/07/15';
$dayName=date("D", strtotime($dateValue);

      

Hi, I want the exact name of the day from the above sample date, please help me.

+3


source to share


2 answers


You need to use it l

as the first parameter.



echo date('l', strtotime($dateValue));

+2


source


You can use the following code,

echo date('l', strtotime($dateValue));

      



for more information see the following link:

http://www.w3schools.com/php/func_date_date.asp

0


source







All Articles