How to get Day Name from date in PHP?

siva picture siva · Jul 30, 2015 · Viewed 10.5k times · Source

How to get Day Name from date in PHP?

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

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

Answer

Daan picture Daan · Jul 30, 2015

You need to use l as the first parameter.

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