I want to get Monday, Tuesday, Wednesday... using php function.
I have only numeric values for those like 1,2,3..7 where
1 = Monday 2 = Tuesday ... 7 = Sunday.<
DateTime::format, with the $format parameter as l (lowercase L).
$format
l
Object Oriented style:
$object->format('l');
Procedural style:
date_format(DateTime $object, 'l');
You can create a DateTime object with DateTime::__construct, and you can learn more about DateTime formats here.